Message ID | 20190110233801.12867-1-blp@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] poll-loop: Set poll loop initial deadline to LLONG_MAX. | expand |
> On Jan 10, 2019, at 3:38 PM, Ben Pfaff <blp@ovn.org> wrote: > > 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. > > Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org> --Justin
diff --git a/lib/poll-loop.c b/lib/poll-loop.c index ec5c8197eb37..4e751ff2c710 100644 --- a/lib/poll-loop.c +++ b/lib/poll-loop.c @@ -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); }
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. Signed-off-by: Ben Pfaff <blp@ovn.org> --- lib/poll-loop.c | 1 + 1 file changed, 1 insertion(+)