From fd722a673417e8d01b4478af603cc7f5d33ec0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 23 Apr 2010 18:28:45 +0000 Subject: [PATCH] * Minor coding style cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36439 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/pthread/pthread_spinlock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system/libroot/posix/pthread/pthread_spinlock.c b/src/system/libroot/posix/pthread/pthread_spinlock.c index 0814061a4c..b0167b53f7 100644 --- a/src/system/libroot/posix/pthread/pthread_spinlock.c +++ b/src/system/libroot/posix/pthread/pthread_spinlock.c @@ -18,7 +18,7 @@ int pthread_spin_init(pthread_spinlock_t* lock, int pshared) { - // this implementation of spinlocks doesn't differentiate + // This implementation of spinlocks doesn't differentiate // between spin locks used by threads in the same process or // between threads of different processes. @@ -37,9 +37,11 @@ pthread_spin_destroy(pthread_spinlock_t* lock) int pthread_spin_lock(pthread_spinlock_t* lock) { - while (atomic_test_and_set((int32*)&lock->lock, LOCKED, UNLOCKED) == LOCKED) + while (atomic_test_and_set((int32*)&lock->lock, LOCKED, UNLOCKED) + == LOCKED) { SPINLOCK_PAUSE(); // spin // TODO: On UP machines we should thread_yield() in the loop. + } return 0; }