This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 2/6] nptl: Add POSIX-proposed sem_clockwait
On 06/06/2019 14:43, Adhemerval Zanella wrote:
>
>
> On 06/06/2019 12:40, Mike Crowe wrote:
>> On Wednesday 05 June 2019 at 18:07:18 -0300, Adhemerval Zanella wrote:
>>> On 27/05/2019 17:03, Mike Crowe wrote:
>>>> Add:
>>>>
>>>> int sem_clockwait (sem_t *sem, clockid_t clock, const struct timespec *abstime)
>>>>
>>>> which behaves just like sem_timedwait, but measures abstime against the
>>>> specified clock. Currently supports CLOCK_REALTIME and CLOCK_MONOTONIC and
>>>> sets errno == EINVAL if any other clock is specified.
>>>
>>> For non-POSIX definition we will need to first export it as a GNU extension
>>> with a possible non-reserved name and later, when it is included on the
>>> standard, to add an alias to the expected name.
>>>
>>> The usual naming scheme is to append the _np suffix (non-portable) on
>>> implementation, similar to recent posix_spawn file action extensions.
>>> In this case it would be sem_clockwait_np.
>>
>> Hi Adhemerval,
>>
>> I thought we went through this before[1] and agreed that the _np suffix wasn't
>> necessary in this case. However, I couldn't find a reply to Florian
>> agreeing to that.
>>
>> [1] https://marc.info/?l=glibc-alpha&m=155256303513500
>>
>> [snip other helpful review comments that I will work on]
>
> I take it is rule of thumb to add names different than the expected one from
> standard, but I don't have a strong opinion here.
>
> The posix_spawn, for instance, were added to mimic the other system names
> (Solaris in this case) and the name originally were added with the extension
> to make it explicit it a non-portable extension. But Solaris also did not
> seem to work towards to make it POSIX standard, so it might the reason to
> it.
Joseph added on IRC that we should add the symbols with the expected naming,
but remember there might be future incompatibilities requiring symbol versioning.
I think it would be fine as well.