The POSIX multithreading API is documented in POSIX https://pubs.opengroup.org/onlinepubs/9699919799/.
To make use of POSIX multithreading, even on platforms that don’t support it natively (most prominently, native Windows), use the following Gnulib modules:
|For thread creation and management:|
|For simple and recursive locks:|
|For read-write locks:|
|For once-only execution:|
|For “condition variables” (wait queues):|
|For thread-local storage:|
|For relinquishing control:|
|For spin locks:|
There is also a convenience module named
pthread which depends on all
of these (except
sched_yield); so you don’t need to enumerate these
modules one by one.