Home
last modified time | relevance | path

Searched refs:sx_lock (Results 1 – 9 of 9) sorted by relevance

/freebsd/sys/kern/
H A Dkern_sx.c217 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 Dsx.h52 * 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.h42 volatile __uintptr_t sx_lock; member
/freebsd/sys/netlink/
H A Dnetlink_generic_kpi.c53 #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 Dlinux_lock.c90 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 Drwlock.h85 ((lock)->sx_lock != SX_LOCK_UNLOCKED && \
86 ((lock)->sx_lock & SX_LOCK_SHARED))
/freebsd/sys/cddl/compat/opensolaris/sys/
H A Drwlock.h84 #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 Dww_mutex.h92 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 Dmutex.h125 return ((struct thread *)SX_OWNER(m->sx.sx_lock) != NULL); in mutex_is_locked()