Searched refs:mutex (Results 1 – 16 of 16) sorted by relevance
/libuv/test/ |
H A D | test-mutexes.c | 29 static uv_mutex_t mutex; variable 39 uv_mutex_t mutex; in TEST_IMPL() local 45 uv_mutex_lock(&mutex); in TEST_IMPL() 46 uv_mutex_unlock(&mutex); in TEST_IMPL() 54 uv_mutex_t mutex; in TEST_IMPL() local 60 uv_mutex_lock(&mutex); in TEST_IMPL() 61 uv_mutex_lock(&mutex); in TEST_IMPL() 64 uv_mutex_unlock(&mutex); in TEST_IMPL() 65 uv_mutex_unlock(&mutex); in TEST_IMPL() 111 uv_mutex_lock(&mutex); in thread_rwlock_trylock_peer() [all …]
|
H A D | test-semaphore.c | 29 uv_mutex_t mutex; member 42 uv_mutex_lock(&c->mutex); in worker() 46 uv_mutex_unlock(&c->mutex); in worker() 57 ASSERT_OK(uv_mutex_init(&wc.mutex)); in TEST_IMPL() 61 uv_mutex_lock(&wc.mutex); in TEST_IMPL() 64 uv_mutex_unlock(&wc.mutex); /* ergo, it should be ok to unlock after wait */ in TEST_IMPL() 67 uv_mutex_destroy(&wc.mutex); in TEST_IMPL() 82 ASSERT_OK(uv_mutex_init(&wc.mutex)); in TEST_IMPL() 88 uv_mutex_destroy(&wc.mutex); in TEST_IMPL()
|
H A D | test-condvar.c | 36 uv_mutex_t mutex; member 61 ASSERT_OK(uv_mutex_init(&wc->mutex)); in worker_config_init() 65 uv_mutex_destroy(&wc->mutex); in worker_config_destroy() 87 uv_mutex_lock(&c->mutex); in condvar_signal() 98 uv_mutex_unlock(&c->mutex); in condvar_signal() 107 uv_mutex_lock(&c->mutex); in condvar_wait() 118 uv_mutex_unlock(&c->mutex); in condvar_wait() 171 uv_mutex_lock(&c->mutex); in condvar_timedwait() 183 uv_mutex_unlock(&c->mutex); in condvar_timedwait() 238 uv_mutex_lock(&wc.mutex); in TEST_IMPL() [all …]
|
H A D | test-async.c | 28 static uv_mutex_t mutex; variable 43 uv_mutex_lock(&mutex); in thread_cb() 45 uv_mutex_unlock(&mutex); in thread_cb() 83 uv_mutex_lock(&mutex); in async_cb() 85 uv_mutex_unlock(&mutex); in async_cb() 104 uv_mutex_unlock(&mutex); in prepare_cb() 111 r = uv_mutex_init(&mutex); in TEST_IMPL() 113 uv_mutex_lock(&mutex); in TEST_IMPL()
|
H A D | test-tcp-reuseport.c | 64 static uv_mutex_t mutex; variable 87 uv_mutex_lock(&mutex); in ticktack() 91 uv_mutex_unlock(&mutex); in ticktack() 119 uv_mutex_lock(&mutex); in on_connection() 121 uv_mutex_unlock(&mutex); in on_connection() 181 r = uv_mutex_init(&mutex); in TEST_IMPL() 237 uv_mutex_destroy(&mutex); in TEST_IMPL()
|
H A D | test-udp-reuseport.c | 82 static uv_mutex_t mutex; variable 109 uv_mutex_lock(&mutex); in ticktack() 113 uv_mutex_unlock(&mutex); in ticktack() 151 uv_mutex_lock(&mutex); in on_recv() 153 uv_mutex_unlock(&mutex); in on_recv() 218 r = uv_mutex_init(&mutex); in TEST_IMPL() 276 uv_mutex_destroy(&mutex); in TEST_IMPL()
|
/libuv/src/unix/ |
H A D | thread.c | 344 if (pthread_mutex_lock(mutex)) in uv_mutex_lock() 364 if (pthread_mutex_unlock(mutex)) in uv_mutex_unlock() 529 uv_mutex_t mutex; member 569 uv_mutex_destroy(&sem->mutex); in uv__custom_sem_destroy() 578 uv_mutex_lock(&sem->mutex); in uv__custom_sem_post() 582 uv_mutex_unlock(&sem->mutex); in uv__custom_sem_post() 590 uv_mutex_lock(&sem->mutex); in uv__custom_sem_wait() 594 uv_mutex_unlock(&sem->mutex); in uv__custom_sem_wait() 606 uv_mutex_unlock(&sem->mutex); in uv__custom_sem_trywait() 611 uv_mutex_unlock(&sem->mutex); in uv__custom_sem_trywait() [all …]
|
/libuv/src/ |
H A D | thread-common.c | 61 rc = uv_mutex_init(&b->mutex); in uv_barrier_init() 76 uv_mutex_destroy(&b->mutex); in uv_barrier_init() 99 uv_mutex_lock(&b->mutex); in uv_barrier_wait() 102 uv_cond_wait((uv_cond_t*) &b->cond, &b->mutex); in uv_barrier_wait() 110 uv_cond_wait((uv_cond_t*) &b->cond, &b->mutex); in uv_barrier_wait() 118 uv_mutex_unlock(&b->mutex); in uv_barrier_wait() 132 uv_mutex_lock(&b->mutex); in uv_barrier_destroy() 136 uv_cond_wait((uv_cond_t*) &b->cond, &b->mutex); in uv_barrier_destroy() 141 uv_mutex_unlock(&b->mutex); in uv_barrier_destroy() 142 uv_mutex_destroy(&b->mutex); in uv_barrier_destroy()
|
H A D | threadpool.c | 34 static uv_mutex_t mutex; variable 65 uv_mutex_lock(&mutex); in worker() 83 uv_mutex_unlock(&mutex); in worker() 119 uv_mutex_unlock(&mutex); in worker() 133 uv_mutex_lock(&mutex); in worker() 143 uv_mutex_lock(&mutex); in post() 159 uv_mutex_unlock(&mutex); in post() 185 uv_mutex_destroy(&mutex); in uv__threadpool_cleanup() 220 if (uv_mutex_init(&mutex)) in init_threads() 285 uv_mutex_lock(&mutex); in uv__work_cancel() [all …]
|
/libuv/src/win/ |
H A D | thread.c | 272 int uv_mutex_init(uv_mutex_t* mutex) { in uv_mutex_init() argument 273 InitializeCriticalSection(mutex); in uv_mutex_init() 279 return uv_mutex_init(mutex); in uv_mutex_init_recursive() 283 void uv_mutex_destroy(uv_mutex_t* mutex) { in uv_mutex_destroy() argument 284 DeleteCriticalSection(mutex); in uv_mutex_destroy() 288 void uv_mutex_lock(uv_mutex_t* mutex) { in uv_mutex_lock() argument 289 EnterCriticalSection(mutex); in uv_mutex_lock() 293 int uv_mutex_trylock(uv_mutex_t* mutex) { in uv_mutex_trylock() argument 294 if (TryEnterCriticalSection(mutex)) in uv_mutex_trylock() 301 void uv_mutex_unlock(uv_mutex_t* mutex) { in uv_mutex_unlock() argument [all …]
|
/libuv/docs/src/guide/ |
H A D | threads.rst | 78 The mutex functions are a **direct** map to the pthread equivalents. 80 .. rubric:: libuv mutex functions 101 The default BSD mutex implementation will raise an error if a thread which has 102 locked a mutex attempts to lock it again. For example, a construct like:: 358 a mutex or rwlock to ensure accesses are performed in the right order.
|
/libuv/docs/src/ |
H A D | threading.rst | 232 .. c:function:: void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex) 233 .. c:function:: int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, uint64_t timeout)
|
/libuv/include/uv/ |
H A D | unix.h | 146 uv_mutex_t mutex; member
|
H A D | win.h | 280 uv_mutex_t mutex; member
|
/libuv/include/ |
H A D | uv.h | 1856 UV_EXTERN void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex); 1858 uv_mutex_t* mutex,
|
/libuv/ |
H A D | ChangeLog | 965 * bsd: ensure mutex is initialized (Ben Noordhuis) 1094 * bsd: destroy mutex in uv__process_title_cleanup() (Darshan Sen) 2163 * doc: fix wrong mutex function prototypes (Leo Chung) 4030 * darwin: abort() if (un)locking fs mutex fails (Ben Noordhuis) 4089 * unix, win: consolidate mutex trylock errors (Saúl Ibarra Corretgé)
|
Completed in 52 milliseconds