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).