[PATCH v8 2/8] nptl: Add C11 threads mtx_* functions

Adhemerval Zanella adhemerval.zanella@linaro.org
Fri Jul 13 13:08:00 GMT 2018



On 12/07/2018 17:38, Florian Weimer wrote:
> On 07/12/2018 10:30 PM, Adhemerval Zanella wrote:
> 
>>> I'm concerned about this because in the future, we might compile the implementations to remove checks that are not needed for the C11 implementations.
>>
>> Why kind of scenario do you have in mind? Maybe use a more streamlined
>> internal implementation for C11 threads?
> 
> Yes, the polymorphic mutex types must have *some* overhead (think of speculatively executing the wrong atomics), and less polymorphism should improve performance.

I think it would quite feasible in next releases to refactor the mutex 
code into C11 required operation and POSIX one and optimize C11 
implementation with a simpler internal one. The bulk of the work is
disentangle the mutex code (I started to check on this sometime ago,
but got sidetracked).



More information about the Libc-alpha mailing list