[PATCH v8 2/8] nptl: Add C11 threads mtx_* functions
Florian Weimer
fweimer@redhat.com
Fri Jul 6 12:51:00 GMT 2018
On 02/02/2018 06:04 PM, Adhemerval Zanella wrote:
> This patch adds the mtx_* definitions from C11 threads (ISO/IEC 9899:2011),
> more specifically mtx_init, mtx_destroy, mtx_lock, mtx_timedlock, mtx_trylock,
> mtx_unlock, and required types.
>
> Mostly of the definitions are composed based on POSIX conterparts, and mtx_t
> is also based on internal pthread fields, but with a distinct internal layout
> to avoid possible issues with code interchange (such as trying to pass POSIX
> structure on C11 functions and to avoid inclusion of pthread.h). The idea
> is to make possible to share POSIX internal implementations for mostly of
> the code (and making adjustment only when required).
Should we check for the supported mutex types and error out if the type
does not match? The interface does not support the full range of error
codes required by robust mutexes, for exampleâEOWNERDEAD is missing.
Thanks,
Florian
More information about the Libc-alpha
mailing list