Lines Matching refs:lock
19 pthread_spin_init(pthread_spinlock_t* lock, int pshared)
25 lock->lock = UNLOCKED;
31 pthread_spin_destroy(pthread_spinlock_t* lock)
38 pthread_spin_lock(pthread_spinlock_t* lock)
40 while (atomic_test_and_set((int32*)&lock->lock, LOCKED, UNLOCKED)
50 pthread_spin_trylock(pthread_spinlock_t* lock)
52 if (atomic_test_and_set((int32*)&lock->lock, LOCKED, UNLOCKED) == LOCKED)
59 pthread_spin_unlock(pthread_spinlock_t* lock)
61 lock->lock = UNLOCKED;