From: Ethan Jackson Date: Tue, 16 Oct 2012 00:05:35 +0000 (-0700) Subject: timeval: Block SIGALRM when sleeping. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61a7b1e6fee6c81b0d8551898d2b108de2b42536;p=openvswitch timeval: Block SIGALRM when sleeping. Commit 00a16895 (timeval: Don't require signals for time_alarm().) Incorrectly disabled signals when when CACHE_TIME was disabled. In fact, the reverse was correct. As a result of this bug, OVS would wake once every 100ms unnecessarily. It shouldn't have affected correctness otherwise. Signed-off-by: Ethan Jackson --- diff --git a/lib/timeval.c b/lib/timeval.c index ea050179..302224ac 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -375,7 +375,7 @@ time_poll(struct pollfd *pollfds, int n_pollfds, long long int timeout_when, break; } - if (!blocked && !CACHE_TIME) { + if (!blocked && CACHE_TIME && !backtrace_conn) { block_sigalrm(&oldsigs); blocked = true; }