mtx_unlock(3) Library Functions Manual mtx_unlock(3) NAME mtx_unlock – unlocks a previously acquired mutex SYNOPSIS library “threads” #include int mtx_unlock(mtx_t *mtx); DESCRIPTION The function mtx_unlock() will unlock a previously acquired mutex mtx. A thread can only unlock a mutex if it has been acquired by that thread before. If recursive mutex acquisition is enabled and the mutex has been acquired by the same thread multiple times mtx_unlock() needs to be called from that thread an equal number of times before any other thread can acquire the mutex. RETURN VALUES Upon success mtx_unlock() returns thrd_success, in the case of an error thrd_error will be returned. SEE ALSO mtx_init(3) mtx_lock(3) mtx_timedlock(3) mtx_trylock(3) mtx_destroy(3) HISTORY The mtx_unlock() function first appeared in the C11 standard ISO/IEC 9899:2011. AUTHORS Jan Adelsbach Debian May 9, 2020 Debian