RIOT/sys/posix/pthread/include/pthread_spin.h
2014-04-18 03:19:31 +02:00

22 lines
602 B
C

/**
* @ingroup pthread
*/
typedef volatile int pthread_spinlock_t;
/* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can
be shared between different processes. */
int pthread_spin_init(pthread_spinlock_t *lock, int pshared);
/* Destroy the spinlock LOCK. */
int pthread_spin_destroy(pthread_spinlock_t *lock);
/* Wait until spinlock LOCK is retrieved. */
int pthread_spin_lock(pthread_spinlock_t *lock);
/* Try to lock spinlock LOCK. */
int pthread_spin_trylock(pthread_spinlock_t *lock);
/* Release spinlock LOCK. */
int pthread_spin_unlock(pthread_spinlock_t *lock);