]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mtx: unlock before traversing threads to wake up
authorMateusz Guzik <mjg@FreeBSD.org>
Fri, 17 Nov 2017 02:25:04 +0000 (02:25 +0000)
committerMateusz Guzik <mjg@FreeBSD.org>
Fri, 17 Nov 2017 02:25:04 +0000 (02:25 +0000)
commit8448e020813ca77e5b4ff60411eac6ddcb955e6b
treefb2e0279b0e261bb4f1e4e1be8f22b51c65dbb0a
parentae7d25a4d736392ecf325f3f1386d405e572e830
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