diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-02-14 11:20:25 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-02-14 11:20:25 +0000 |
commit | 943c4932f34e31f9a0e4d0c31812ee551ac28da8 (patch) | |
tree | 81bc7097a0b69459e8b394abc6c8a47912ee2cdd | |
parent | 2207447bf4c3fa03e9dbde829712e0f31e447ba2 (diff) |
Notes
-rw-r--r-- | sys/kern/kern_lock.c | 40 | ||||
-rw-r--r-- | sys/sys/lockmgr.h | 2 |
2 files changed, 0 insertions, 42 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index b48bc608e177..61977d707d17 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1114,46 +1114,6 @@ out: return (0); } -int -lockmgr_unlock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk) -{ - struct lock_class *class; - uintptr_t x, tid; - const char *file; - int line; - - if (KERNEL_PANICKED()) - return (0); - - file = __FILE__; - line = __LINE__; - - _lockmgr_assert(lk, KA_LOCKED, file, line); - x = lk->lk_lock; - if (__predict_true(x & LK_SHARE) != 0) { - lockmgr_note_shared_release(lk, file, line); - if (lockmgr_sunlock_try(lk, &x)) { - LOCKSTAT_PROFILE_RELEASE_RWLOCK(lockmgr__release, lk, LOCKSTAT_READER); - } else { - return (lockmgr_sunlock_hard(lk, x, flags, ilk, file, line)); - } - } else { - tid = (uintptr_t)curthread; - lockmgr_note_exclusive_release(lk, file, line); - if (!lockmgr_recursed(lk) && - atomic_cmpset_rel_ptr(&lk->lk_lock, tid, LK_UNLOCKED)) { - LOCKSTAT_PROFILE_RELEASE_RWLOCK(lockmgr__release, lk, LOCKSTAT_WRITER); - } else { - return (lockmgr_xunlock_hard(lk, x, flags, ilk, file, line)); - } - } - if (__predict_false(flags & LK_INTERLOCK)) { - class = LOCK_CLASS(ilk); - class->lc_unlock(ilk); - } - return (0); -} - /* * Lightweight entry points for common operations. * diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h index 803e749e176c..fd0004618e93 100644 --- a/sys/sys/lockmgr.h +++ b/sys/sys/lockmgr.h @@ -72,8 +72,6 @@ int __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, const char *wmesg, int prio, int timo, const char *file, int line); int lockmgr_lock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk, const char *file, int line); -int lockmgr_unlock_fast_path(struct lock *lk, u_int flags, - struct lock_object *ilk); int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line); int lockmgr_xlock(struct lock *lk, u_int flags, const char *file, int line); int lockmgr_unlock(struct lock *lk); |