From 38b01da7d2b4c1df95f315ea9c8f9395570473dc Mon Sep 17 00:00:00 2001 From: davidxu Date: Tue, 16 Oct 2007 07:36:02 +0000 Subject: Reverse the logic of UP and SMP. Submitted by: jasone --- lib/libthr/thread/thr_pspinlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libthr') 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; -- cgit v1.1