[ovs-dev] [threads 07/17] timeval: Do not block SIGALRM around setting 'deadline' in time_alarm().
Ethan Jackson
ethan at nicira.com
Wed Jun 5 21:08:45 UTC 2013
Acked-by: Ethan Jackson <ethan at nicira.com>
On Wed, Jun 5, 2013 at 1:05 PM, Ben Pfaff <blp at nicira.com> wrote:
> 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
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list