timeval: Do not block SIGALRM around setting 'deadline' in time_alarm().
authorBen Pfaff <blp@nicira.com>
Thu, 9 May 2013 18:26:24 +0000 (11:26 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 5 Jun 2013 21:58:01 +0000 (14:58 -0700)
There is no need to do so because the signal handler does not read or
write 'deadline'.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/timeval.c

index f687c96..d2b7508 100644 (file)
@@ -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: