2
0
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:
Ben Pfaff
2013-05-09 11:26:24 -07:00
parent 0c53ae66a3
commit a19b84f4a6

View 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: