MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lockmgr_sunlock_try

Function lockmgr_sunlock_try

freebsd/kern/kern_lock.c:532–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530}
531
532static bool __always_inline
533lockmgr_sunlock_try(struct lock *lk, uintptr_t *xp)
534{
535
536 for (;;) {
537 if (LK_SHARERS(*xp) > 1 || !(*xp & LK_ALL_WAITERS)) {
538 if (atomic_fcmpset_rel_ptr(&lk->lk_lock, xp,
539 *xp - LK_ONE_SHARER))
540 return (true);
541 continue;
542 }
543 break;
544 }
545 return (false);
546}
547
548static bool
549lockmgr_slock_adaptive(struct lock_delay_arg *lda, struct lock *lk, uintptr_t *xp,

Callers 2

wakeupshlkFunction · 0.85
lockmgr_unlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected