Namespaces
Variants
Actions

Standard library header <threads.h> (C11)

From cppreference.com
< c‎ | header

This header is part of concurrency support library and provides support for threads, mutual exclusion, condition variables, and thread-specific storages.

Contents

[edit] Threads

thrd_t implementation-defined complete object type identifying a thread [edit]
creates a thread
(function) [edit]
checks if two identifiers refer to the same thread
(function) [edit]
obtains the current thread identifier
(function) [edit]
suspends execution of the calling thread for the given period of time
(function) [edit]
yields the current time slice
(function) [edit]
terminates the calling thread
(function) [edit]
detaches a thread
(function) [edit]
blocks until a thread terminates
(function) [edit]
indicates a thread error status
(constant) [edit]
thrd_start_t
(C11)
a typedef of the function pointer type int(*)(void*), used by thrd_create
(typedef) [edit]

[edit] Mutual exclusion

mtx_t mutex identifier [edit]
creates a mutex
(function) [edit]
blocks until locks a mutex
(function) [edit]
blocks until locks a mutex or times out
(function) [edit]
locks a mutex or returns without blocking if already locked
(function) [edit]
unlocks a mutex
(function) [edit]
destroys a mutex
(function) [edit]
defines the type of a mutex
(enum) [edit]
Call once
calls a function exactly once
(function) [edit]

[edit] Condition variables

cnd_t condition variable identifier
creates a condition variable
(function) [edit]
unblocks one thread blocked on a condition variable
(function)