svn commit: r233443 - user/davidxu/pth_objdestroy/lib/libthr/thread
David Xu
davidxu at FreeBSD.org
Sun Mar 25 02:05:43 UTC 2012
Author: davidxu
Date: Sun Mar 25 02:05:43 2012
New Revision: 233443
URL: http://svn.freebsd.org/changeset/base/233443
Log:
Use optimistic version of THR_LOCK_RELEASE which is better
when lock is contented.
Modified:
user/davidxu/pth_objdestroy/lib/libthr/thread/thr_sleepq.c
Modified: user/davidxu/pth_objdestroy/lib/libthr/thread/thr_sleepq.c
==============================================================================
--- user/davidxu/pth_objdestroy/lib/libthr/thread/thr_sleepq.c Sun Mar 25 02:03:22 2012 (r233442)
+++ user/davidxu/pth_objdestroy/lib/libthr/thread/thr_sleepq.c Sun Mar 25 02:05:43 2012 (r233443)
@@ -90,7 +90,7 @@ _sleepq_unlock(void *wchan)
struct pthread *curthread = _get_curthread();
sc = SC_LOOKUP(wchan);
- THR_LOCK_RELEASE(curthread, &sc->sc_lock);
+ THR_LOCK_RELEASE_OPT(curthread, &sc->sc_lock);
}
struct sleepqueue *
More information about the svn-src-user
mailing list