2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

poll-loop: Set poll loop initial deadline to LLONG_MAX.

This is consistent with the re-initialization value that poll_block() uses.
It is better than 0 because the monotonic clock can have a negative value,
even though that is rare and pathological.

Found by inspection.

Acked-by: Justin Pettit <jpettit@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ben Pfaff
2019-01-10 15:38:01 -08:00
parent 2e38f13d70
commit d350b48d32

View File

@@ -415,6 +415,7 @@ poll_loop(void)
loop = pthread_getspecific(key);
if (!loop) {
loop = xzalloc(sizeof *loop);
loop->timeout_when = LLONG_MAX;
hmap_init(&loop->poll_nodes);
xpthread_setspecific(key, loop);
}