It might be useful for glibc to implement the C11 <threads.h> functionality.
has some comments about how this might be done without having a new shared library. (However, making pthreadtypes.h stay within the ISO C reserved namespace may be harder than suggested there, because of C++ mangling issues; see how when we gave the union that's pthread_attr_t a tag, it had to be exactly "union pthread_attr_t" to avoid changing the mangling.)
I think it's safe (and probably preferable) NOT to use the same types for C11 threads. This will catch program errors of trying to call a C11 thread function on a POSIX thread object or vice versa. Of course, if it's desirable for the implementations to be shared (and I believe it is), then the corresponding types should have the same *sizes*, and internally the code should just cast away (or spirit it away with weak symbols and fake prototypes) the difference in pointer types.
In any case, I'd like to hear a decision on what glibc intends to do on this issue. I'm aiming to keep the C (but not C++) ABI in musl libc mostly compatible with glibc, and not knowing what sizes glibc intends to use for the C11 mutex, etc. types is preventing me from getting C11 threads implemented.
I am surprised by any lack of progress in this for almost five years. Is there any reason why glibc hasn't added C11 threading support yet, or is it just that no-one has any interest in it?
A complicated patch series can be expected to go through many cycles of
patch review and revision. At some point, detailed review comments were
provided for one patch series revision and updated patches did not follow.
I'm not sure what Adhemerval's plans are having picked up those patches
and put them on the azanella/c11-threads branch (or whether the patches
there do reflect all the review comments, or whether the various C11 DRs
relating to the definition of the C11 threads interfaces have been
reviewed to make sure the implementation properly respects the DR