summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2007-10-16 07:36:02 +0000
committerdavidxu <davidxu@FreeBSD.org>2007-10-16 07:36:02 +0000
commit38b01da7d2b4c1df95f315ea9c8f9395570473dc (patch)
treedd30675b6c7fae605e8712202c08263f352c34c6 /lib/libthr
parent926fe51a285a19d8e8b4e240044cc2891739d38a (diff)
downloadFreeBSD-src-38b01da7d2b4c1df95f315ea9c8f9395570473dc.zip
FreeBSD-src-38b01da7d2b4c1df95f315ea9c8f9395570473dc.tar.gz
Reverse the logic of UP and SMP.
Submitted by: jasone
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/thread/thr_pspinlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_pspinlock.c b/lib/libthr/thread/thr_pspinlock.c
index d5684fc..9e1f96e 100644
--- a/lib/libthr/thread/thr_pspinlock.c
+++ b/lib/libthr/thread/thr_pspinlock.c
@@ -104,7 +104,7 @@ _pthread_spin_lock(pthread_spinlock_t *lock)
count = SPIN_COUNT;
while ((ret = THR_UMUTEX_TRYLOCK(curthread, &lck->s_lock)) != 0) {
while (lck->s_lock.m_owner) {
- if (_thr_is_smp) {
+ if (!_thr_is_smp) {
_pthread_yield();
} else {
CPU_SPINWAIT;
OpenPOWER on IntegriCloud