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 1/7] nptl: Add clockid parameter to futex timed wait calls



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.


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