Lines Matching refs:mutex
93 #define pipe_static_mutex(mutex) \ argument
94 static pipe_mutex mutex = _MTX_INITIALIZER_NP
96 #define pipe_mutex_init(mutex) \ argument
97 (void) mtx_init(&(mutex), mtx_plain)
99 #define pipe_mutex_destroy(mutex) \ argument
100 mtx_destroy(&(mutex))
102 #define pipe_mutex_lock(mutex) \ argument
103 (void) mtx_lock(&(mutex))
105 #define pipe_mutex_unlock(mutex) \ argument
106 (void) mtx_unlock(&(mutex))
119 #define pipe_condvar_wait(cond, mutex) \ argument
120 cnd_wait(&(cond), &(mutex))
159 pipe_mutex mutex; member
168 pipe_mutex_init(barrier->mutex); in pipe_barrier_init()
175 pipe_mutex_destroy(barrier->mutex); in pipe_barrier_destroy()
181 pipe_mutex_lock(barrier->mutex); in pipe_barrier_wait()
190 pipe_condvar_wait(barrier->condvar, barrier->mutex); in pipe_barrier_wait()
198 pipe_mutex_unlock(barrier->mutex); in pipe_barrier_wait()
211 pipe_mutex mutex; member
220 pipe_mutex_init(sema->mutex); in pipe_semaphore_init()
228 pipe_mutex_destroy(sema->mutex); in pipe_semaphore_destroy()
236 pipe_mutex_lock(sema->mutex); in pipe_semaphore_signal()
239 pipe_mutex_unlock(sema->mutex); in pipe_semaphore_signal()
246 pipe_mutex_lock(sema->mutex); in pipe_semaphore_wait()
248 pipe_condvar_wait(sema->cond, sema->mutex); in pipe_semaphore_wait()
251 pipe_mutex_unlock(sema->mutex); in pipe_semaphore_wait()