Lines Matching refs:mtx
41 mtx_destroy(mtx_t *mtx) in mtx_destroy() argument
44 _DIAGASSERT(mtx != NULL); in mtx_destroy()
49 (void)pthread_mutex_destroy(mtx); in mtx_destroy()
53 mtx_init_default(mtx_t *mtx) in mtx_init_default() argument
56 _DIAGASSERT(mtx != NULL); in mtx_init_default()
58 if (pthread_mutex_init(mtx, NULL) != 0) in mtx_init_default()
65 mtx_init_recursive(mtx_t *mtx) in mtx_init_recursive() argument
69 _DIAGASSERT(mtx != NULL); in mtx_init_recursive()
80 if (pthread_mutex_init(mtx, &attr) == 0) in mtx_init_recursive()
89 mtx_init(mtx_t *mtx, int type) in mtx_init() argument
92 _DIAGASSERT(mtx != NULL); in mtx_init()
97 return mtx_init_default(mtx); in mtx_init()
100 return mtx_init_recursive(mtx); in mtx_init()
107 mtx_lock(mtx_t *mtx) in mtx_lock() argument
110 _DIAGASSERT(mtx != NULL); in mtx_lock()
112 if (pthread_mutex_lock(mtx) == 0) in mtx_lock()
119 mtx_timedlock(mtx_t *__restrict mtx, const struct timespec *__restrict ts) in mtx_timedlock() argument
122 _DIAGASSERT(mtx != NULL); in mtx_timedlock()
125 switch(pthread_mutex_timedlock(mtx, ts)) { in mtx_timedlock()
136 mtx_trylock(mtx_t *mtx) in mtx_trylock() argument
139 _DIAGASSERT(mtx != NULL); in mtx_trylock()
141 switch(pthread_mutex_trylock(mtx)) { in mtx_trylock()
152 mtx_unlock(mtx_t *mtx) in mtx_unlock() argument
155 _DIAGASSERT(mtx != NULL); in mtx_unlock()
157 if (pthread_mutex_unlock(mtx) == 0) in mtx_unlock()