| 530 | } |
| 531 | |
| 532 | static bool __always_inline |
| 533 | lockmgr_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 | |
| 548 | static bool |
| 549 | lockmgr_slock_adaptive(struct lock_delay_arg *lda, struct lock *lk, uintptr_t *xp, |
no outgoing calls
no test coverage detected