[ovs-dev] [threads 07/17] timeval: Do not block SIGALRM around setting 'deadline' in time_alarm().

Ben Pfaff blp at nicira.com
Wed Jun 5 20:05:12 UTC 2013


There is no need to do so because the signal handler does not read or
write 'deadline'.

Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 lib/timeval.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/lib/timeval.c b/lib/timeval.c
index f687c96..d2b7508 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -326,17 +326,12 @@ time_alarm(unsigned int secs)
     long long int now;
     long long int msecs;
 
-    sigset_t oldsigs;
-
     time_init();
     time_refresh();
 
     now = time_msec();
     msecs = secs * 1000LL;
-
-    block_sigalrm(&oldsigs);
     deadline = now < LLONG_MAX - msecs ? now + msecs : LLONG_MAX;
-    unblock_sigalrm(&oldsigs);
 }
 
 /* Like poll(), except:
-- 
1.7.2.5




More information about the dev mailing list