Lines Matching refs:mutex
45 #define pipe_mutex_assert_locked(mutex) \ argument
46 __pipe_mutex_assert_locked(&(mutex))
49 __pipe_mutex_assert_locked(mtx_t *mutex) in __pipe_mutex_assert_locked() argument
55 int ret = mtx_trylock(mutex); in __pipe_mutex_assert_locked()
58 mtx_unlock(mutex); in __pipe_mutex_assert_locked()
60 (void)mutex; in __pipe_mutex_assert_locked()
71 mtx_t mutex; member
80 (void) mtx_init(&sema->mutex, mtx_plain); in pipe_semaphore_init()
88 mtx_destroy(&sema->mutex); in pipe_semaphore_destroy()
96 mtx_lock(&sema->mutex); in pipe_semaphore_signal()
99 mtx_unlock(&sema->mutex); in pipe_semaphore_signal()
106 mtx_lock(&sema->mutex); in pipe_semaphore_wait()
108 cnd_wait(&sema->cond, &sema->mutex); in pipe_semaphore_wait()
111 mtx_unlock(&sema->mutex); in pipe_semaphore_wait()