![]() |
![]() |
![]() |
Lock a thread spinlock
#include <pthread.h> int pthread_spin_lock( pthread_spinlock_t * spinner );
libc
The pthread_spin_lock() function locks the thread spinlock specified by spinner. If spinner isn't immediately available, pthread_spin_lock() spins until spinner can be locked.
If a thread attempts to lock a spinlock that's already locked via pthread_spin_lock() or pthread_spin_trylock() it deadlocks.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
pthread_spin_destroy(), pthread_spin_init(), pthread_spin_trylock(), pthread_spin_unlock()
![]() |
![]() |
![]() |