This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC 3/7] y2038: clock_settime: Provide __clock_settime64 implementation for linux


On Wed, 27 Mar 2019, Lukasz Majewski wrote:

> * include/time.h: Remove __clock_settime typeof
> * include/time.h: Add __clock_settime64 definition according to __TIMESIZE
> * sysdeps/unix/sysv/linux/clock_settime.c: Remove clock_settime alias
> * sysdeps/unix/sysv/linux/clock_settime.c:
>   Add clock_settime when __TIMESIZE != 64
>   Rewrite __clock_settime() to __clock_settime64 with explicit support for
>   64 bit time

For every patch posted, please state explicitly how that patch was tested 
(should include the glibc testsuite for at least one 32-bit and at least 
one 64-bit configuration).  That's critical information to have any 
confidence in the lack of obvious ABI / linknamespace issues in a patch.

> +int
> +__clock_settime64 (clockid_t clock_id, const struct __timespec64 *tp)
> +{
> +	/* Make sure the time cvalue is OK.  */
> +	if (tp->tv_nsec < 0 || tp->tv_nsec >= 1000000000)
> +		{
> +			__set_errno (EINVAL);
> +			return -1;
> +		}
> +
> +	return INLINE_SYSCALL_CALL (clock_settime, clock_id, tp);
> +}

Globally, in the patch series, follow GNU style for indentation 
(two-column).

> +/* The clock_settime symbol needs to be public as librt is also
> +   using it */

Globally, in the patch series, follow GNU style for comments (start with a 
capital letter, end with '.' and two spaces).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]