mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
timeval: Do not block SIGALRM around setting 'deadline' in time_alarm().
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>
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user