mtx: unlock before traversing threads to wake up
authormjg <mjg@FreeBSD.org>
Fri, 17 Nov 2017 02:25:04 +0000 (02:25 +0000)
committermjg <mjg@FreeBSD.org>
Fri, 17 Nov 2017 02:25:04 +0000 (02:25 +0000)
commit24a0d3819fdbc20a807b9f7463e6d16ce3c470fa
treefb2e0279b0e261bb4f1e4e1be8f22b51c65dbb0a
parentd5884672d5a74afbe11bdf62027449857032681d
mtx: unlock before traversing threads to wake up

This shortens the lock hold time while not affecting corretness.
All the woken up threads end up competing can lose the race against
a completely unrelated thread getting the lock anyway.
sys/kern/kern_mutex.c