Searched refs:sx_lock (Results 1 – 9 of 9) sorted by relevance
/freebsd/sys/kern/ |
H A D | kern_sx.c | 217 x = sx->sx_lock; in owner_sx() 239 ASSERT_ATOMIC_LOAD_PTR(sx->sx_lock, in sx_init_flags() 240 ("%s: sx_lock not aligned for %s: %p", __func__, description, in sx_init_flags() 241 &sx->sx_lock)); in sx_init_flags() 258 sx->sx_lock = SX_LOCK_UNLOCKED; in sx_init_flags() 266 KASSERT(sx->sx_lock == SX_LOCK_UNLOCKED, ("sx lock still held")); in sx_destroy() 268 sx->sx_lock = SX_LOCK_DESTROYED; in sx_destroy() 284 x = sx->sx_lock; in sx_try_slock_int() 290 if (atomic_fcmpset_acq_ptr(&sx->sx_lock, &x, x + SX_ONE_SHARER)) { in sx_try_slock_int() 322 KASSERT(sx->sx_lock ! in _sx_xlock() [all...] |
/freebsd/sys/sys/ |
H A D | sx.h | 52 * The sx_lock field consists of several fields. The low bit 93 #define SX_READ_VALUE(sx) ((sx)->sx_lock) 165 !atomic_fcmpset_acq_ptr(&sx->sx_lock, &v, tid))) in __sx_xlock() 178 !atomic_fcmpset_rel_ptr(&sx->sx_lock, &x, SX_LOCK_UNLOCKED))) in __sx_xunlock() 247 ((sx)->sx_lock & SX_LOCK_SHARED ? NULL : \ 248 (struct thread *)SX_OWNER((sx)->sx_lock)) 251 (((sx)->sx_lock & ~(SX_LOCK_FLAGMASK & ~SX_LOCK_SHARED)) == \
|
H A D | _sx.h | 42 volatile __uintptr_t sx_lock; member
|
/freebsd/sys/netlink/ |
H A D | netlink_generic_kpi.c | 53 #define GENL_LOCK() sx_xlock(&sx_lock) 54 #define GENL_UNLOCK() sx_xunlock(&sx_lock) 55 static struct sx sx_lock; variable 56 SX_SYSINIT(genl_lock, &sx_lock, "genetlink lock");
|
/freebsd/sys/compat/linuxkpi/common/src/ |
H A D | linux_lock.c | 90 SX_OWNER(lock->base.sx.sx_lock); in linux_ww_mutex_lock_sub() 105 other->lock->base.sx.sx_lock) == curthread) { in linux_ww_mutex_lock_sub() 125 if ((struct thread *)SX_OWNER(lock->base.sx.sx_lock) == NULL) in linux_ww_mutex_lock_sub()
|
/freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/ |
H A D | rwlock.h | 85 ((lock)->sx_lock != SX_LOCK_UNLOCKED && \ 86 ((lock)->sx_lock & SX_LOCK_SHARED))
|
/freebsd/sys/cddl/compat/opensolaris/sys/ |
H A D | rwlock.h | 84 #define rw_read_held(lock) ((lock)->sx_lock != SX_LOCK_UNLOCKED && ((lock)->sx_lock & SX_LOCK_SHARE…
|
/freebsd/sys/compat/linuxkpi/common/include/linux/ |
H A D | ww_mutex.h | 92 else if ((struct thread *)SX_OWNER(lock->base.sx.sx_lock) == curthread) in ww_mutex_lock() 103 else if ((struct thread *)SX_OWNER(lock->base.sx.sx_lock) == curthread) in ww_mutex_lock_interruptible()
|
H A D | mutex.h | 125 return ((struct thread *)SX_OWNER(m->sx.sx_lock) != NULL); in mutex_is_locked()
|