Ticket #5693: spin-lock-trylock-EBUSY.patch
File spin-lock-trylock-EBUSY.patch, 468 bytes (added by , 14 years ago) |
---|
-
src/system/libroot/posix/pthread/pthread_spinlock.c
44 44 pthread_spin_trylock(pthread_spinlock_t* lock) 45 45 { 46 46 if (atomic_test_and_set((int32*)&lock->lock, LOCKED, UNLOCKED) == LOCKED) 47 return EBUSY;47 return -EBUSY; 48 48 return 0; 49 49 } 50 50