|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <threads.h> | ||
int mtx_init(mtx_t* mutex,int type); | (since C11) | |
Creates a new mutex object withtype. The object pointed to bymutex is set to an identifier of the newly created mutex.
type must have one of the following values:
Contents |
| mutex | - | pointer to the mutex to initialize |
| type | - | the type of the mutex |
thrd_success if successful,thrd_error otherwise.
C++ documentation formutex | |
C++ documentation fortimed_mutex | |
C++ documentation forrecursive_mutex | |
C++ documentation forrecursive_timed_mutex |