/freebsd-current/contrib/netbsd-tests/usr.bin/xlint/lint1/ |
H A D | d_c99_nested_struct.c | 21 pthread_mutex_t lock; member in struct:arc4random_global 24 .lock = { 0x33330003, 0, { 0, 0, 0 }, 0, { 0, 0, 0 }, ((void *)0), ((void *)0), 0, ((void *)0) },
|
/freebsd-current/contrib/ofed/librdmacm/ |
H A D | cma.h | 57 static inline void fastlock_init(fastlock_t *lock) argument 59 sem_init(&lock->sem, 0, 0); 60 atomic_store(&lock->cnt, 0); 62 static inline void fastlock_destroy(fastlock_t *lock) argument 64 sem_destroy(&lock->sem); 66 static inline void fastlock_acquire(fastlock_t *lock) argument 68 if (atomic_fetch_add(&lock->cnt, 1) > 0) 69 sem_wait(&lock->sem); 71 static inline void fastlock_release(fastlock_t *lock) argument 73 if (atomic_fetch_sub(&lock [all...] |
/freebsd-current/contrib/openbsm/bin/auditdistd/ |
H A D | synch.h | 49 mtx_init(pthread_mutex_t *lock) argument 53 error = pthread_mutex_init(lock, NULL); 57 mtx_destroy(pthread_mutex_t *lock) argument 61 error = pthread_mutex_destroy(lock); 65 mtx_lock(pthread_mutex_t *lock) argument 69 error = pthread_mutex_lock(lock); 73 mtx_trylock(pthread_mutex_t *lock) argument 77 error = pthread_mutex_trylock(lock); 82 mtx_unlock(pthread_mutex_t *lock) argument 86 error = pthread_mutex_unlock(lock); 90 mtx_owned(pthread_mutex_t *lock) argument 97 rw_init(pthread_rwlock_t *lock) argument 105 rw_destroy(pthread_rwlock_t *lock) argument 113 rw_rlock(pthread_rwlock_t *lock) argument 121 rw_wlock(pthread_rwlock_t *lock) argument 129 rw_unlock(pthread_rwlock_t *lock) argument 155 cv_wait(pthread_cond_t *cv, pthread_mutex_t *lock) argument 163 cv_timedwait(pthread_cond_t *cv, pthread_mutex_t *lock, int timeout) argument [all...] |
/freebsd-current/sys/kern/ |
H A D | kern_rangelock.c | 31 #include <sys/lock.h> 71 rangelock_init(struct rangelock *lock) argument 74 TAILQ_INIT(&lock->rl_waiters); 75 lock->rl_currdep = NULL; 79 rangelock_destroy(struct rangelock *lock) argument 82 KASSERT(TAILQ_EMPTY(&lock->rl_waiters), ("Dangling waiters")); 100 * Recalculate the lock->rl_currdep after an unlock. 103 rangelock_calc_block(struct rangelock *lock) argument 107 for (entry = lock->rl_currdep; entry != NULL; entry = nextentry) { 111 for (entry1 = TAILQ_FIRST(&lock 140 rangelock_unlock_locked(struct rangelock *lock, struct rl_q_entry *entry, struct mtx *ilk, bool do_calc_block) argument 176 rangelock_unlock(struct rangelock *lock, void *cookie, struct mtx *ilk) argument 189 rangelock_unlock_range(struct rangelock *lock, void *cookie, off_t start, off_t end, struct mtx *ilk) argument 217 rangelock_enqueue(struct rangelock *lock, off_t start, off_t end, int mode, struct mtx *ilk, bool trylock) argument 271 rangelock_rlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) argument 278 rangelock_tryrlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) argument 286 rangelock_wlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) argument 293 rangelock_trywlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) argument [all...] |
H A D | kern_condvar.c | 35 #include <sys/lock.h> 65 #define CV_ASSERT(cvp, lock, td) do { \ 69 KASSERT((lock) != NULL, ("%s: lock NULL", __func__)); \ 108 _cv_wait(struct cv *cvp, struct lock_object *lock) argument 119 CV_ASSERT(cvp, lock, td); 120 WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, lock, 135 class = LOCK_CLASS(lock); 140 if (lock == &Giant.lock_object) 144 sleepq_add(cvp, lock, cv 171 _cv_wait_unlock(struct cv *cvp, struct lock_object *lock) argument 228 _cv_wait_sig(struct cv *cvp, struct lock_object *lock) argument 296 _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock, sbintime_t sbt, sbintime_t pr, int flags) argument 366 _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock, sbintime_t sbt, sbintime_t pr, int flags) argument [all...] |
/freebsd-current/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_atomic_clang_mips.h | 21 // internal spin lock mechanism to emulate atomic operations when the size is 23 static void __spin_lock(volatile int *lock) { argument 24 while (__sync_lock_test_and_set(lock, 1)) 25 while (*lock) { 29 static void __spin_unlock(volatile int *lock) { __sync_lock_release(lock); } argument 31 // Make sure the lock is on its own cache line to prevent false sharing. 35 int lock; member in struct:__sanitizer::__anon1012 37 } __attribute__((aligned(32))) lock = {0, {0}}; member in namespace:__sanitizer 49 __spin_lock(&lock [all...] |
/freebsd-current/sys/sys/ |
H A D | lock.h | 44 * Lock classes. Each lock has a class which describes characteristics 48 * an error to perform any type of context switch while holding a spin lock. 49 * Also, for an individual lock to be recursable, its class must allow 50 * recursion and the lock itself must explicitly allow recursion. 53 * data for the 'show lock' DDB command. The 'lc_lock' and 55 * to lock and unlock locks while blocking on a sleep queue. The 63 void (*lc_assert)(const struct lock_object *lock, int what); 64 void (*lc_ddb_show)(const struct lock_object *lock); 65 void (*lc_lock)(struct lock_object *lock, uintptr_t how); 66 int (*lc_owner)(const struct lock_object *lock, [all...] |
H A D | rangelock.h | 42 * The structure representing the range lock. Caller may request 44 * all existing lock owners are compatible with the request. Two lock 51 * rl_waiters is the queue containing in order (a) granted write lock 52 * requests, (b) granted read lock requests, and (c) in order of arrival, 53 * lock requests which cannot be granted yet. 55 * rl_currdep is the first lock request that cannot be granted now due 68 void rangelock_init(struct rangelock *lock); 69 void rangelock_destroy(struct rangelock *lock); 70 void rangelock_unlock(struct rangelock *lock, voi [all...] |
/freebsd-current/sys/contrib/ck/include/ |
H A D | ck_tflock.h | 82 ck_tflock_ticket_write_lock(struct ck_tflock_ticket *lock) argument 86 previous = ck_tflock_ticket_fca_32(&lock->request, CK_TFLOCK_TICKET_WC_TOPMSK, 89 while (ck_pr_load_32(&lock->completion) != previous) 97 ck_tflock_ticket_write_unlock(struct ck_tflock_ticket *lock) argument 101 ck_tflock_ticket_fca_32(&lock->completion, CK_TFLOCK_TICKET_WC_TOPMSK, 107 ck_tflock_ticket_read_lock(struct ck_tflock_ticket *lock) argument 111 previous = ck_tflock_ticket_fca_32(&lock->request, 117 while ((ck_pr_load_32(&lock->completion) & 127 ck_tflock_ticket_read_unlock(struct ck_tflock_ticket *lock) argument 131 ck_tflock_ticket_fca_32(&lock [all...] |
H A D | ck_elide.h | 145 ck_elide_##N##_lock_adaptive(T *lock, \ 161 if (L_P(lock) == true) \ 173 if (L_P(lock) == false) \ 187 L(lock); \ 191 ck_elide_##N##_unlock_adaptive(struct ck_elide_stat *st, T *lock) \ 194 if (U_P(lock) == false) { \ 199 U(lock); \ 205 ck_elide_##N##_lock(T *lock) \ 209 L(lock); \ 213 if (L_P(lock) [all...] |
/freebsd-current/lib/libthr/ |
H A D | plockstat.d | 39 probe rw__acquire(void *lock, int wr); 40 probe rw__release(void *lock, int wr); 41 probe rw__block(void *lock, int wr); 42 probe rw__blocked(void *lock, int wr, int success); 43 probe rw__error(void *lock, int wr, int err);
|
/freebsd-current/sys/dev/mana/ |
H A D | gdma_util.c | 42 mtx_init(&c->lock, "gdma_completion", NULL, MTX_DEF); 49 mtx_destroy(&c->lock); 55 mtx_lock(&c->lock); 57 mtx_unlock(&c->lock); 64 mtx_lock(&c->lock); 66 mtx_sleep(c, &c->lock, 0, "gdma_wfc", 0); 68 mtx_unlock(&c->lock); 79 mtx_lock(&c->lock); 82 mtx_sleep(c, &c->lock, 0, "gdma_wfc", timeout); 91 mtx_unlock(&c->lock); [all...] |
/freebsd-current/sys/compat/linuxkpi/common/include/linux/ |
H A D | ww_mutex.h | 75 ww_mutex_trylock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx __unused) argument 78 ww_mutex_trylock(struct ww_mutex *lock) 81 return (mutex_trylock(&lock->base)); 88 ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) argument 92 else if ((struct thread *)SX_OWNER(lock->base.sx.sx_lock) == curthread) 95 return (linux_ww_mutex_lock_sub(lock, ctx, 0)); 99 ww_mutex_lock_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) argument 103 else if ((struct thread *)SX_OWNER(lock->base.sx.sx_lock) == curthread) 106 return (linux_ww_mutex_lock_sub(lock, ctx, 1)); 112 ww_mutex_unlock(struct ww_mutex *lock) argument 121 ww_mutex_destroy(struct ww_mutex *lock) argument 133 ww_mutex_init(struct ww_mutex *lock, struct ww_class *ww_class) argument [all...] |
/freebsd-current/sys/compat/linuxkpi/common/src/ |
H A D | linux_lock.c | 35 struct ww_mutex *lock; member in struct:ww_mutex_thread 70 /* lock a mutex with deadlock avoidance */ 72 linux_ww_mutex_lock_sub(struct ww_mutex *lock, argument 83 if (unlikely(sx_try_xlock(&lock->base.sx) == 0)) { 85 entry.lock = lock; 90 SX_OWNER(lock->base.sx.sx_lock); 99 * lock and is at the same time trying 100 * to acquire a lock this thread owns, 105 other->lock 136 linux_ww_mutex_unlock_sub(struct ww_mutex *lock) argument [all...] |
/freebsd-current/contrib/ntp/sntp/libevent/ |
H A D | evthread-internal.h | 50 /* Global function pointers to lock-related functions. NULL if locking isn't 65 * running a given event_base's loop. Requires lock. */ 72 * thread. Requires lock. */ 78 /** Allocate a new lock, and store it in lockvar, a void*. Sets lockvar to 84 /** Free a given lock, if it is present and locking is enabled. */ 92 /** Acquire a lock. */ 96 evthread_lock_fns_.lock(mode, lockvar); \ 99 /** Release a lock */ 116 /** Lock an event_base, if it is set up for locking. Acquires the lock 127 /** If lock debuggin 140 EVLOCK_TRY_LOCK_(void *lock) argument 263 EVLOCK_TRY_LOCK_(void *lock) argument [all...] |
H A D | evthread_pthread.c | 48 pthread_mutex_t *lock = mm_malloc(sizeof(pthread_mutex_t)); local 49 if (!lock) 53 if (pthread_mutex_init(lock, attr)) { 54 mm_free(lock); 57 return lock; 63 pthread_mutex_t *lock = lock_; local 64 pthread_mutex_destroy(lock); 65 mm_free(lock); 71 pthread_mutex_t *lock = lock_; local 73 return pthread_mutex_trylock(lock); 81 pthread_mutex_t *lock = lock_; local 141 pthread_mutex_t *lock = lock_; local [all...] |
/freebsd-current/contrib/libevent/ |
H A D | evthread-internal.h | 50 /* Global function pointers to lock-related functions. NULL if locking isn't 65 * running a given event_base's loop. Requires lock. */ 72 * thread. Requires lock. */ 78 /** Allocate a new lock, and store it in lockvar, a void*. Sets lockvar to 84 /** Free a given lock, if it is present and locking is enabled. */ 92 /** Acquire a lock. */ 96 evthread_lock_fns_.lock(mode, lockvar); \ 99 /** Release a lock */ 116 /** Lock an event_base, if it is set up for locking. Acquires the lock 127 /** If lock debuggin 140 EVLOCK_TRY_LOCK_(void *lock) argument 263 EVLOCK_TRY_LOCK_(void *lock) argument [all...] |
H A D | evthread_pthread.c | 48 pthread_mutex_t *lock = mm_malloc(sizeof(pthread_mutex_t)); local 49 if (!lock) 53 if (pthread_mutex_init(lock, attr)) { 54 mm_free(lock); 57 return lock; 63 pthread_mutex_t *lock = lock_; local 64 pthread_mutex_destroy(lock); 65 mm_free(lock); 71 pthread_mutex_t *lock = lock_; local 73 return pthread_mutex_trylock(lock); 81 pthread_mutex_t *lock = lock_; local 141 pthread_mutex_t *lock = lock_; local [all...] |
/freebsd-current/contrib/ofed/libmlx5/ |
H A D | doorbell.h | 50 static inline void mlx5_write64(uint32_t val[2], void *dest, struct mlx5_spinlock *lock) argument 57 static inline void mlx5_write64(uint32_t val[2], void *dest, struct mlx5_spinlock *lock) argument 59 mlx5_spin_lock(lock); 62 mlx5_spin_unlock(lock);
|
/freebsd-current/sys/dev/vkbd/ |
H A D | vkbd_var.h | 42 int lock; /* keyboard lock key state */ member in struct:vkbd_status
|
/freebsd-current/usr.bin/lock/ |
H A D | Makefile | 2 PROG= lock
|
/freebsd-current/contrib/unbound/services/ |
H A D | view.c | 64 lock_rw_init(&v->lock); 65 lock_protect(&v->lock, &v->vtree, sizeof(v->vtree)); 79 lock_rw_destroy(&v->lock); 98 lock_rw_destroy(&v->lock); 115 lock_rw_init(&v->lock); 116 lock_protect(&v->lock, &v->name, sizeof(*v)-sizeof(rbnode_type)); 131 lock_rw_wrlock(&vs->lock); 132 lock_rw_wrlock(&v->lock); 135 lock_rw_unlock(&v->lock); 137 lock_rw_unlock(&vs->lock); [all...] |
/freebsd-current/contrib/llvm-project/lldb/source/Expression/ |
H A D | Expression.cpp | 20 assert(m_target_wp.lock()); 27 assert(m_target_wp.lock());
|
/freebsd-current/crypto/openssl/include/internal/ |
H A D | refcount.h | 31 ossl_unused void *lock) 48 ossl_unused void *lock) 62 static __inline__ int CRYPTO_UP_REF(int *val, int *ret, ossl_unused void *lock) argument 69 ossl_unused void *lock) 81 ossl_unused void *lock) 88 ossl_unused void *lock) 107 ossl_unused void *lock) 114 ossl_unused void *lock) 135 ossl_unused void *lock) 142 ossl_unused void *lock) 30 CRYPTO_UP_REF(_Atomic int *val, int *ret, ossl_unused void *lock) argument 47 CRYPTO_DOWN_REF(_Atomic int *val, int *ret, ossl_unused void *lock) argument 68 CRYPTO_DOWN_REF(int *val, int *ret, ossl_unused void *lock) argument 80 CRYPTO_UP_REF(volatile int *val, int *ret, ossl_unused void *lock) argument 87 CRYPTO_DOWN_REF(volatile int *val, int *ret, ossl_unused void *lock) argument 106 CRYPTO_UP_REF(volatile int *val, int *ret, ossl_unused void *lock) argument 113 CRYPTO_DOWN_REF(volatile int *val, int *ret, ossl_unused void *lock) argument 134 CRYPTO_UP_REF(volatile int *val, int *ret, ossl_unused void *lock) argument 141 CRYPTO_DOWN_REF(volatile int *val, int *ret, ossl_unused void *lock) argument [all...] |
/freebsd-current/contrib/libevent/include/event2/ |
H A D | thread.h | 35 lock its data structures. 58 @name Flags passed to lock functions 62 /** A flag passed to a locking callback when the lock was allocated as a 63 * read-write lock, and we want to acquire or release the lock for writing. */ 65 /** A flag passed to a locking callback when the lock was allocated as a 66 * read-write lock, and we want to acquire or release the lock for reading. */ 69 * for the lock; if we can't get the lock immediatel 115 int (*lock)(unsigned mode, void *lock); member in struct:evthread_lock_callbacks [all...] |