Adelsbach Enhanced Threading Library

Manual Pages (DD-00013-001)

Enhanced Threading Library > mtx_destroy (3)
HTML TXT PDF PS
mtx_destroy(3) Library Functions Manual mtx_destroy(3)

mtx_destroydestroy a mutex

library “threads”
#include <threads.h>

int
mtx_destroy(mtx_t *mtx);

The function () destroy the given mutex mtx.

There must be no threads waiting on the given mutex when it is destroyed.

Upon success mtx_destroy() returns thrd_success, in the case of an error thrd_error will be returned.

mtx_init(3) mtx_lock(3) mtx_timedlock(3) mtx_trylock(3) mtx_unlock(3)

The mtx_destroy() function first appeared in the C11 standard ISO/IEC 9899:2011.

Jan Adelsbach <jan@jadelsbach.de>

May 9, 2020 Debian