/freebsd-current/sys/kern/ |
H A D | kern_lock.c | 38 #include <sys/lock.h> 59 PMC_SOFT_DECLARE( , , lock, failed); 66 "prio flags wont fit in u_short pri in struct lock"); 146 static void assert_lockmgr(const struct lock_object *lock, int how); 148 static void db_show_lockmgr(const struct lock_object *lock); 150 static void lock_lockmgr(struct lock_object *lock, uintptr_t how); 152 static int owner_lockmgr(const struct lock_object *lock, 155 static uintptr_t unlock_lockmgr(struct lock_object *lock); 183 static bool __always_inline lockmgr_slock_try(struct lock *lk, uintptr_t *xp, 185 static bool __always_inline lockmgr_sunlock_try(struct lock *l 403 assert_lockmgr(const struct lock_object *lock, int what) argument 410 lock_lockmgr(struct lock_object *lock, uintptr_t how) argument 417 unlock_lockmgr(struct lock_object *lock) argument 425 owner_lockmgr(const struct lock_object *lock, struct thread **owner) argument 1815 db_show_lockmgr(const struct lock_object *lock) argument [all...] |
/freebsd-current/contrib/unbound/services/cache/ |
H A D | dns.c | 97 lock_rw_rdlock(&rep->ref[i].key->entry.lock); 103 lock_rw_unlock(&rep->ref[i].key->entry.lock); 227 * for the lock ordering */ 228 lock_rw_unlock(&rrset->entry.lock); 289 lock_rw_unlock(&e->lock); 309 lock_rw_unlock(&akey->entry.lock); 314 lock_rw_unlock(&akey->entry.lock); 322 lock_rw_unlock(&neg->entry.lock); 329 lock_rw_unlock(&akey->entry.lock); 334 lock_rw_unlock(&akey->entry.lock); [all...] |
/freebsd-current/contrib/unbound/util/ |
H A D | alloc.c | 58 lock_rw_init(&t->entry.lock); 63 * Result is 1 lock per alloc_max newly created entries. 124 lock_quick_init(&alloc->lock); 125 lock_protect(&alloc->lock, alloc, sizeof(*alloc)); 139 lock_rw_destroy(&p->entry.lock); 149 lock_quick_lock(&alloc->lock); 155 lock_quick_unlock(&alloc->lock); 167 lock_quick_destroy(&alloc->lock); 174 lock_quick_lock(&alloc->super->lock); 178 lock_quick_unlock(&alloc->super->lock); [all...] |
/freebsd-current/contrib/ofed/opensm/opensm/ |
H A D | osm_db_files.c | 95 cl_spinlock_t lock; member in struct:osm_db_domain_imp 140 cl_spinlock_destroy(&p_domain_imp->lock); 278 cl_spinlock_construct(&p_domain_imp->lock); 279 cl_spinlock_init(&p_domain_imp->lock); 304 /* take the lock on the domain */ 305 cl_spinlock_acquire(&p_domain_imp->lock); 450 cl_spinlock_release(&p_domain_imp->lock); 488 cl_spinlock_acquire(&p_domain_imp->lock); 535 cl_spinlock_release(&p_domain_imp->lock); 556 cl_spinlock_acquire(&p_domain_imp->lock); [all...] |
/freebsd-current/contrib/llvm-project/llvm/lib/ExecutionEngine/MCJIT/ |
H A D | MCJIT.cpp | 94 std::lock_guard<sys::Mutex> locked(lock); 106 std::lock_guard<sys::Mutex> locked(lock); 115 std::lock_guard<sys::Mutex> locked(lock); 142 std::lock_guard<sys::Mutex> locked(lock); 149 std::lock_guard<sys::Mutex> locked(lock); 190 // Get a thread lock to make sure we aren't trying to load multiple times 191 std::lock_guard<sys::Mutex> locked(lock); 239 std::lock_guard<sys::Mutex> locked(lock); 259 std::lock_guard<sys::Mutex> locked(lock); 274 std::lock_guard<sys::Mutex> locked(lock); [all...] |
/freebsd-current/contrib/ntp/sntp/libevent/test/ |
H A D | regress_thread.c | 70 void *lock; member in struct:cond_wait 78 EVLOCK_LOCK(cw->lock, 0); 80 EVLOCK_UNLOCK(cw->lock, 0); 88 EVLOCK_LOCK(cw->lock, 0); 90 EVLOCK_UNLOCK(cw->lock, 0); 106 EVTHREAD_ALLOC_LOCK(cw.lock, 0); 108 assert(cw.lock); 118 EVLOCK_LOCK(cw.lock, 0); 123 assert(EVTHREAD_COND_WAIT(cw.cond, cw.lock) == 0); 124 EVLOCK_UNLOCK(cw.lock, [all...] |
/freebsd-current/sys/dev/qat/qat_common/ |
H A D | adf_transport.c | 54 mtx_lock(&bank->lock); 56 mtx_unlock(&bank->lock); 60 mtx_unlock(&bank->lock); 67 mtx_lock(&bank->lock); 69 mtx_unlock(&bank->lock); 81 mtx_lock(&bank->lock); 83 mtx_unlock(&bank->lock); 98 mtx_lock(&bank->lock); 100 mtx_unlock(&bank->lock); 118 mtx_lock(&ring->lock); [all...] |
H A D | adf_fw_counters.c | 221 init_rwsem(&fw_counters_data->lock); 250 down_write(&fw_counters_data->lock); 252 up_write(&fw_counters_data->lock); 344 down_write(&fw_counters_data->lock); 346 up_write(&fw_counters_data->lock); 379 down_write(&fw_counters_data->lock); 382 up_write(&fw_counters_data->lock); 405 down_write(&fw_counters_data->lock); 407 up_write(&fw_counters_data->lock);
|
/freebsd-current/contrib/libevent/test/ |
H A D | regress_thread.c | 70 void *lock; member in struct:cond_wait 78 EVLOCK_LOCK(cw->lock, 0); 80 EVLOCK_UNLOCK(cw->lock, 0); 88 EVLOCK_LOCK(cw->lock, 0); 90 EVLOCK_UNLOCK(cw->lock, 0); 106 EVTHREAD_ALLOC_LOCK(cw.lock, 0); 108 assert(cw.lock); 118 EVLOCK_LOCK(cw.lock, 0); 123 assert(EVTHREAD_COND_WAIT(cw.cond, cw.lock) == 0); 124 EVLOCK_UNLOCK(cw.lock, [all...] |
/freebsd-current/sys/dev/sound/pci/ |
H A D | via82c686.c | 93 struct mtx *lock; member in struct:via_info 248 snd_mtxlock(via->lock); 271 snd_mtxunlock(via->lock); 293 snd_mtxlock(via->lock); 298 snd_mtxunlock(via->lock); 349 snd_mtxlock(via->lock); 356 snd_mtxunlock(via->lock); 370 snd_mtxlock(via->lock); 376 snd_mtxunlock(via->lock); 429 snd_mtxlock(via->lock); [all...] |
H A D | cmi.c | 119 struct mtx *lock; member in struct:sc_info 364 snd_mtxlock(sc->lock); 370 snd_mtxunlock(sc->lock); 397 snd_mtxlock(sc->lock); 411 snd_mtxunlock(sc->lock); 425 snd_mtxlock(sc->lock); 453 snd_mtxunlock(sc->lock); 487 snd_mtxlock(sc->lock); 509 snd_mtxunlock(sc->lock); 520 snd_mtxlock(sc->lock); [all...] |
/freebsd-current/sys/dev/nvmf/ |
H A D | nvmf_tcp.c | 16 #include <sys/lock.h> 60 struct mtx lock; member in struct:nvmf_tcp_command_buffer_list 99 * two locations, all protected by the rx_buffers.lock. If a 221 mtx_assert(&list->lock, MA_OWNED); 231 mtx_assert(&list->lock, MA_OWNED); 243 mtx_assert(&list->lock, MA_OWNED); 253 mtx_lock(&list->lock); 257 mtx_unlock(&list->lock); 260 mtx_unlock(&list->lock); 509 mtx_assert(&qp->rx_buffers.lock, MA_OWNE [all...] |
/freebsd-current/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
H A D | tsd_shared.h | 60 TSDs[I].lock(); 80 // Try to lock the currently associated context. 87 TSD->lock(); 94 Mutex.lock(); 96 TSDs[I].lock(); 122 TSDs[I].lock(); 123 // Theoretically, we want to mark TSD::lock()/TSD::unlock() with proper 230 CandidateTSD->lock(); 236 CurrentTSD->lock();
|
H A D | stats.h | 28 // lock, because those are expensive operations , and we only care for the stats 89 void lock() ACQUIRE(Mutex) { Mutex.lock(); } 92 void disable() ACQUIRE(Mutex) { lock(); }
|
/freebsd-current/contrib/unbound/util/storage/ |
H A D | slabhash.c | 149 lock_quick_lock(&sl->array[i]->lock); 151 lock_quick_unlock(&sl->array[i]->lock); 194 lock_rw_destroy(&k->entry.lock); free(k);} 246 lock_quick_lock(&sh->array[slab]->lock); 248 lock_quick_unlock(&sh->array[slab]->lock); 258 lock_quick_lock(&sh->array[slab]->lock); 263 lock_quick_unlock(&sh->array[slab]->lock);
|
H A D | lruhash.h | 46 * hashtable lock is a spinlock, not rwlock. 47 * o the idea is to move every thread through the hash lock quickly, 52 * o lock hashtable. 54 * o lock hash bin. 58 * o lock entry (rwlock). 70 * o unlock the entry if you hold the lock already. 71 * o lock hashtable. 73 * o lock hash bin. 77 * o lock entry (writelock). 79 * o unlock entry (nobody else should be waiting for this lock, 149 lock_quick_type lock; member in struct:lruhash 193 lock_quick_type lock; member in struct:lruhash_bin 212 lock_rw_type lock; member in struct:lruhash_entry [all...] |
/freebsd-current/crypto/openssl/crypto/ |
H A D | provider_core.c | 65 * therefore no lock is required for the "write once/read many" fields. It is 66 * safe for multiple threads to read these fields without a lock, because they 70 * shared between multiple threads. Where this is the case a lock is required. 87 * The store lock: Used to control the stack of provider's held within the 91 * - keep the scope of the code that is protected by a lock to the absolute 93 * - try to keep the scope of the lock to within a single function (i.e. avoid 94 * making calls to other functions while holding a lock); 95 * - try to only ever hold one lock at a time. 102 * provider store lock, the provider flag_lock and the provider refcnt_lock. 105 * 1) provider store lock 220 CRYPTO_RWLOCK *lock; member in struct:provider_store_st 1050 int lock = 1; local 1117 provider_activate(OSSL_PROVIDER *prov, int lock, int upcalls) argument [all...] |
/freebsd-current/sys/dev/mlx4/mlx4_core/ |
H A D | mlx4_cq.c | 75 spin_lock(&cq_table->lock); 81 spin_unlock(&cq_table->lock); 258 spin_lock_irq(&cq_table->lock); 260 spin_unlock_irq(&cq_table->lock); 301 spin_lock_irq(&cq_table->lock); 303 spin_unlock_irq(&cq_table->lock); 327 spin_lock_irq(&cq_table->lock); 329 spin_unlock_irq(&cq_table->lock); 344 spin_lock_init(&cq_table->lock);
|
/freebsd-current/sys/contrib/openzfs/module/os/linux/spl/ |
H A D | spl-kmem.c | 236 * spl_vmalloc() is strongly discouraged because a global lock 237 * must be acquired. Contention on this lock can significantly 351 * the contention by moving to a lock per xmem_table entry model. 377 kmem_del_init(spinlock_t *lock, struct hlist_head *table, argument 385 spin_lock_irqsave(lock, flags); 393 spin_unlock_irqrestore(lock, flags); 398 spin_unlock_irqrestore(lock, flags); 561 spl_kmem_init_tracking(struct list_head *list, spinlock_t *lock, int size) argument 565 spin_lock_init(lock); 575 spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock) argument [all...] |
/freebsd-current/sys/contrib/dev/mediatek/mt76/ |
H A D | agg-rx.c | 104 spin_lock(&tid->lock); 107 spin_unlock(&tid->lock); 140 spin_lock_bh(&tid->lock); 145 spin_unlock_bh(&tid->lock); 181 spin_lock_bh(&tid->lock); 239 spin_unlock_bh(&tid->lock); 258 spin_lock_init(&tid->lock); 271 spin_lock_bh(&tid->lock); 285 spin_unlock_bh(&tid->lock);
|
/freebsd-current/contrib/llvm-project/lldb/include/lldb/Utility/ |
H A D | Predicate.h | 124 std::unique_lock<std::mutex> lock(m_mutex); 127 m_condition.wait(lock, RealCond); 130 if (m_condition.wait_for(lock, *timeout, RealCond))
|
/freebsd-current/sys/dev/netmap/ |
H A D | netmap_mbq.c | 39 #include <sys/lock.h> 57 mtx_init(&q->lock, "mbq", NULL, MTX_SPIN); 161 mtx_destroy(&q->lock);
|
/freebsd-current/contrib/llvm-project/lldb/include/lldb/Target/ |
H A D | PathMappingList.h | 55 std::lock_guard<std::recursive_mutex> lock(m_mutex); 60 std::lock_guard<std::recursive_mutex> lock(m_mutex); 139 std::lock_guard<std::recursive_mutex> lock(m_mutex);
|
/freebsd-current/crypto/openssl/test/ |
H A D | threadstest.c | 39 CRYPTO_RWLOCK *lock = CRYPTO_THREAD_lock_new(); local 42 res = TEST_true(CRYPTO_THREAD_read_lock(lock)) 43 && TEST_true(CRYPTO_THREAD_unlock(lock)) 44 && TEST_true(CRYPTO_THREAD_write_lock(lock)) 45 && TEST_true(CRYPTO_THREAD_unlock(lock)); 47 CRYPTO_THREAD_lock_free(lock); 147 CRYPTO_RWLOCK *lock = CRYPTO_THREAD_lock_new(); local 149 if (!TEST_ptr(lock)) 164 if (!TEST_true(CRYPTO_atomic_add(&val, 1, &ret, lock))) 183 if (!TEST_true(CRYPTO_atomic_or(&val64, 2, &ret64, lock))) [all...] |
/freebsd-current/crypto/openssl/ssl/ |
H A D | ssl_sess.c | 99 * Need to lock this all up rather than just use CRYPTO_add so that 103 if (!CRYPTO_THREAD_read_lock(ssl->lock)) 108 CRYPTO_THREAD_unlock(ssl->lock); 140 ss->lock = CRYPTO_THREAD_lock_new(); 141 if (ss->lock == NULL) { 148 CRYPTO_THREAD_lock_free(ss->lock); 200 dest->lock = CRYPTO_THREAD_lock_new(); 201 if (dest->lock == NULL) { 384 if (!CRYPTO_THREAD_read_lock(s->lock)) 386 if (!CRYPTO_THREAD_read_lock(s->session_ctx->lock)) { [all...] |