Lines Matching defs:mtx
38 mtx_destroy(mtx_t *mtx)
41 (void)pthread_mutex_destroy(mtx);
45 mtx_init(mtx_t *mtx, int type)
67 if (pthread_mutex_init(mtx, &attr) != 0)
73 mtx_lock(mtx_t *mtx)
76 if (pthread_mutex_lock(mtx) != 0)
82 mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts)
85 switch (pthread_mutex_timedlock(mtx, ts)) {
96 mtx_trylock(mtx_t *mtx)
99 switch (pthread_mutex_lock(mtx)) {
110 mtx_unlock(mtx_t *mtx)
113 if (pthread_mutex_unlock(mtx) != 0)