This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/7] nptl: Add clockid parameter to futex timed wait calls
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Mon, 11 Mar 2019 08:50:37 -0300
- Subject: Re: [PATCH 1/7] nptl: Add clockid parameter to futex timed wait calls
- References: <cover.b0c66849a87ca79889a49f2f1f2563b1a8a15d8b.1551291557.git-series.mac@mcrowe.com> <93715d4ac59e160bf7ef244832d56b062b78e425.1551291557.git-series.mac@mcrowe.com> <95576d14-16b5-baea-4405-015381d251c1@linaro.org> <20190310085956.kt7yc2npxttfivlt@mcrowe.com>
On 10/03/2019 05:59, Mike Crowe wrote:
> On Tuesday 05 March 2019 at 09:39:58 -0300, Adhemerval Zanella wrote:
>>> diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c
>>> index 9a0f29e..daa4e25 100644
>>> --- a/nptl/pthread_cond_wait.c
>>> +++ b/nptl/pthread_cond_wait.c
>>> @@ -537,7 +537,7 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex,
>>> {
>>> /* Use CLOCK_REALTIME. */
>>> err = futex_abstimed_wait_cancelable
>>> - (cond->__data.__g_signals + g, 0, abstime, private);
>>> + (cond->__data.__g_signals + g, 0, CLOCK_REALTIME, abstime, private);
>>> }
>>> }
>>>
>>
>> Since we still assume that an architecture might not support futex
>> with CLOCK_REALTIME, this part should check for __ASSUME_FUTEX_CLOCK_REALTIME
>> as other parts.
>>
>> I proposed recently to just assume __ASSUME_FUTEX_CLOCK_REALTIME
>> support [1], which simplifies this patch.
>
> Whilst trying to implement pthread_mutex_clockclock offline yesterday, I
> decided to propose the same thing. It looks like I don't need to. :)
>
>> [1] https://sourceware.org/ml/libc-alpha/2019-02/msg00667.html
>
> It would certainly make my life easier if that patch was merged.
>
> Thanks.
It is already merged.