Specific Linux syscalls for glibc API

Adhemerval Zanella adhemerval.zanella@linaro.org
Wed Nov 18 19:43:00 GMT 2015



On 18-11-2015 17:23, Florian Weimer wrote:
> On 11/18/2015 07:52 PM, Adhemerval Zanella wrote:
>>
>>
>> On 18-11-2015 16:35, Florian Weimer wrote:
>>> On 11/18/2015 06:58 PM, Adhemerval Zanella wrote:
>>>
>>>> Do we really have a compelling reason for gettid?
>>>
>>> It makes sense to use them in conjunction with process-shared futexes to
>>> indicate ownership.  The return value of pthread_self isn't meaningful
>>> to other processes.  Having to words (PID and address) complicates matters.
>>
>> Are you referring to PI-futexes?
> 
> No, a recursive lock implemented with a regular futex.
> 
> Florian
> 

Right, but my question stands: for recursive mutex API where the idea is 
to check if the thread already own the locks, is the best approach to
expose gettid? Couldn't we encapsulate the recursive futex operation
and make all the tid operation internally?



More information about the Libc-alpha mailing list