[LTP] [PATCH v2 2/4] syscalls/{mq_timedsend, mq_timedreceive}: Convert to new API + cleanup
Cyril Hrubis
chrubis@suse.cz
Thu Jun 29 15:54:09 CEST 2017
Hi!
> +static pid_t set_sig(void)
> +{
> + clock_gettime(CLOCK_REALTIME, &eintr_ts);
> + eintr_ts.tv_sec += 3;
> +
> + return create_sig_proc(SIGINT, 40, 200000);
> +}
> +
> +static void set_timeout(void)
> +{
> + clock_gettime(CLOCK_REALTIME, &timeout_ts);
> + timeout_ts.tv_nsec += 50000000;
> + timeout_ts.tv_sec += timeout_ts.tv_nsec / 1000000000;
> + timeout_ts.tv_nsec %= 1000000000;
> +}
I went ahead and changed these two functions to get the timespec as a
parameter, which eliminated need for the two global timespec variables,
which made the code flow a bit easier to understand.
And pushed the patchset, thanks.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list