Home
last modified time | relevance | path

Searched refs:lock (Results 1 – 18 of 18) sorted by relevance

/unit/src/
H A Dnxt_atomic.h30 __sync_bool_compare_and_swap(lock, cmp, set)
34 __sync_lock_test_and_set(lock, set)
42 nxt_atomic_cmp_set(lock, 0, 1)
46 __sync_lock_release(lock)
80 atomic_add_swap(lock, set)
118 nxt_atomic_cmp_set(lock, 0, 1)
122 *lock = 0;
182 __fetch_and_swaplp(lock, set)
209 __fetch_and_swap(lock, set)
244 nxt_atomic_try_lock(nxt_atomic_t *lock) in nxt_atomic_try_lock() argument
[all …]
H A Dnxt_spinlock.c63 nxt_thread_spin_lock(nxt_thread_spinlock_t *lock) in nxt_thread_spin_lock() argument
67 nxt_thread_log_debug("spin_lock(%p) enter", lock); in nxt_thread_spin_lock()
73 if (nxt_fast_path(nxt_atomic_try_lock(lock))) { in nxt_thread_spin_lock()
81 if (*lock == 0) { in nxt_thread_spin_lock()
92 nxt_thread_spin_trylock(nxt_thread_spinlock_t *lock) in nxt_thread_spin_trylock() argument
94 nxt_thread_log_debug("spin_trylock(%p) enter", lock); in nxt_thread_spin_trylock()
96 if (nxt_fast_path(nxt_atomic_try_lock(lock))) { in nxt_thread_spin_trylock()
100 nxt_thread_log_debug("spin_trylock(%p) failed", lock); in nxt_thread_spin_trylock()
107 nxt_thread_spin_unlock(nxt_thread_spinlock_t *lock) in nxt_thread_spin_unlock() argument
109 nxt_atomic_release(lock); in nxt_thread_spin_unlock()
[all …]
H A Dnxt_spinlock.h14 NXT_EXPORT void nxt_thread_spin_lock(nxt_thread_spinlock_t *lock);
15 NXT_EXPORT nxt_bool_t nxt_thread_spin_trylock(nxt_thread_spinlock_t *lock);
16 NXT_EXPORT void nxt_thread_spin_unlock(nxt_thread_spinlock_t *lock);
H A Dnxt_log_moderation.c28 nxt_thread_spin_lock(&mod->lock); in nxt_log_moderate_allow()
58 nxt_thread_spin_unlock(&mod->lock); in nxt_log_moderate_allow()
84 nxt_thread_spin_lock(&mod->lock); in nxt_log_moderate_timer_handler()
91 nxt_thread_spin_unlock(&mod->lock); in nxt_log_moderate_timer_handler()
H A Dnxt_work_queue.c232 nxt_thread_spin_lock(&lwq->lock); in nxt_locked_work_queue_add()
243 nxt_thread_spin_unlock(&lwq->lock); in nxt_locked_work_queue_add()
258 nxt_thread_spin_lock(&lwq->lock); in nxt_locked_work_queue_pop()
280 nxt_thread_spin_unlock(&lwq->lock); in nxt_locked_work_queue_pop()
294 nxt_thread_spin_lock(&lwq->lock); in nxt_locked_work_queue_move()
301 nxt_thread_spin_unlock(&lwq->lock); in nxt_locked_work_queue_move()
H A Dnxt_lib.c137 nxt_thread_spin_lock(&rt->lock); in nxt_lib_stop()
142 nxt_thread_spin_unlock(&rt->lock); in nxt_lib_stop()
H A Dnxt_log_moderation.h15 nxt_thread_spinlock_t lock; member
H A Dnxt_mem_zone.c73 nxt_thread_spinlock_t lock; member
478 nxt_thread_spin_lock(&zone->lock); in nxt_mem_zone_align()
486 nxt_thread_spin_lock(&zone->lock); in nxt_mem_zone_align()
491 nxt_thread_spin_unlock(&zone->lock); in nxt_mem_zone_align()
784 nxt_thread_spin_lock(&zone->lock); in nxt_mem_zone_free()
809 nxt_thread_spin_unlock(&zone->lock); in nxt_mem_zone_free()
H A Dnxt_cache.h17 nxt_thread_spinlock_t lock; member
H A Dnxt_work_queue.h78 nxt_thread_spinlock_t lock; member
H A Dnxt_thread_pool.c74 nxt_thread_spin_lock(&tp->work_queue.lock); in nxt_thread_pool_init()
108 nxt_thread_spin_unlock(&tp->work_queue.lock); in nxt_thread_pool_init()
H A Dnxt_router.c1195 nxt_thread_spinlock_t *lock; in nxt_router_conf_ready() local
1207 lock = &rtcf->router->lock; in nxt_router_conf_ready()
1209 nxt_thread_spin_lock(lock); in nxt_router_conf_ready()
3481 lock = &skcf->router_conf->router->lock; in nxt_router_listen_socket_create()
3483 nxt_thread_spin_lock(lock); in nxt_router_listen_socket_create()
3642 lock = &skcf->router_conf->router->lock; in nxt_router_listen_socket_release()
3644 nxt_thread_spin_lock(lock); in nxt_router_listen_socket_release()
3714 lock = &rtcf->router->lock; in nxt_router_conf_release()
3716 nxt_thread_spin_lock(lock); in nxt_router_conf_release()
3974 nxt_thread_spin_lock(lock); in nxt_router_access_log_use()
[all …]
H A Dnxt_router.h31 nxt_thread_spinlock_t lock; member
H A Dnxt_file_cache.c497 nxt_thread_spin_lock(&cache->lock); in nxt_file_cache_lock()
506 nxt_thread_spin_unlock(&cache->lock); in nxt_file_cache_unlock()
H A Dnxt_cache.c115 nxt_thread_spin_lock(&cache->lock); in nxt_cache_lock()
124 nxt_thread_spin_unlock(&cache->lock); in nxt_cache_unlock()
H A Dnxt_openssl.c247 nxt_thread_mutex_t *lock; in nxt_openssl_lock() local
249 lock = &nxt_openssl_locks[type]; in nxt_openssl_lock()
252 (void) nxt_thread_mutex_lock(lock); in nxt_openssl_lock()
255 (void) nxt_thread_mutex_unlock(lock); in nxt_openssl_lock()
/unit/auto/
H A Dthreads86 pthread_spinlock_t lock;
88 if (pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE) != 0)
90 if (pthread_spin_lock(&lock) != 0)
92 if (pthread_spin_unlock(&lock) != 0)
94 if (pthread_spin_destroy(&lock) != 0)
113 pthread_spinlock_t lock = 0;
116 if (pthread_spin_trylock(&lock) != 0)
118 if (pthread_spin_unlock(&lock) != 0)
/unit/src/java/nginx/unit/websocket/
H A DAsyncChannelGroupUtil.java44 private static final Object lock = new Object(); field in AsyncChannelGroupUtil
53 synchronized (lock) { in register()
64 synchronized (lock) { in unregister()