Ticket #5693: spin-lock-trylock-EBUSY.patch

File spin-lock-trylock-EBUSY.patch, 468 bytes (added by lucian, 14 years ago)
  • src/system/libroot/posix/pthread/pthread_spinlock.c

     
    4444pthread_spin_trylock(pthread_spinlock_t* lock)
    4545{
    4646    if (atomic_test_and_set((int32*)&lock->lock, LOCKED, UNLOCKED) == LOCKED)
    47         return EBUSY;
     47        return -EBUSY;
    4848    return 0;
    4949}
    5050