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: [PATCH 01/12] Remove implementations of clock_[gs]ettime using [gs]ettimeofday.



On 22/08/2019 09:54, Zack Weinberg wrote:
> On 8/20/19 2:06 PM, Adhemerval Zanella wrote:
>>
>>
>> On 20/08/2019 10:21, Zack Weinberg wrote:
>>> gettimeofday and settimeofday are obsolete in POSIX and will not be
>>> provided by Linux for future new architectures.  The preferred
>>> interfaces are clock_gettime and clock_settime.
>>>
>>> In preparation for implementing all the other time query/set
>>> interfaces using clock_gettime and clock_settime, remove the
>>> generic-Unix implementations of clock_gettime and clock_settime that
>>> forwarded to gettimeofday and settimeofday.  Ports of glibc to
>>> historic Unixes that provided these functions, but not clock_gettime
>>> and clock_settime, are unlikely to be contributed anymore.
>>>
>>> The removed implementations *were* being used on the Hurd.
>>> Deal with this by converting the Hurd gettimeofday and settimeofday
>>> implementations into clock_gettime and clock_settime implementations,
>>> respectively.  (They still only supply microsecond resolution.
>>> I don’t know enough about Hurd/Mach to know whether nanosecond-
>>> resolution clocks are even available.)  This means Hurd temporarily
>>> has no implementation of gettimeofday or settimeofday; this will be
>>> corrected in subsequent patches.  (glibc will not fail to build in the
>>> i386-gnu configuration, but gettimeofday and settimeofday will be
>>> ENOSYS stubs.)
>>
>> I would prefer to avoid patch that might break the ABI, couldn't you
>> attach this change with the one that fix it for Hurd as well?
> 
> The changes that fix this for Hurd are the "use clock_gettime to
> implement gettimeofday" and "use clock_settime to implement
> settimeofday" patches.  I think it will be easier to review the patch
> series if I keep those separate, but I can reorganize it so that those
> two patches happen immediately after this one, and squash them together
> for final commit, does that plan work for you?

I think it would better, thanks.

> 
>>>
>>> 	* sysdeps/unix/clock_gettime.c, sysdeps/unix/clock_settime.c:
>>>         Delete file.
>>>         * sysdeps/mach/gettimeofday.c: Rename to .../clock_gettime.c
>>>         and convert into an implementation of clock_gettime.
>>
>> I would prefer to just use the full path (makes it more readable).
>>
>>>         * sysdeps/mach/hurd/settimeofday.c: Rename to .../clock_settime.c
>>>         and convert into an implementation of clock_settime.
>>
>> Ditto.
> 
> Changed in my local copy.
> 
> zw
> 


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