Main index | Section 3 | Options |
#include <pthread.h>
The pthread_spin_trylock() function is the same as pthread_spin_lock() except that if it cannot acquire lock immediately it will return with an error.
The pthread_spin_unlock() function will release lock, which must have been previously locked by a call to pthread_spin_lock() or pthread_spin_trylock().
None of these functions will return EINTR.
[EINVAL] | |
The value specified by lock is invalid or is not initialized. | |
The pthread_spin_lock() function may fail if:
[EDEADLK] | |
The calling thread already owns the lock. | |
The pthread_spin_trylock() function will fail if:
[EBUSY] | |
Another thread currently holds lock. | |
The pthread_spin_unlock() function may fail if:
[EPERM] | |
The calling thread does not own lock. | |
PTHREAD_SPIN_LOCK (3) | January 22, 2004 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Ken Thompson has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gauge, nor any of the other numerous idiot lights which plague the modern driver. Rather, if the driver makes a mistake, a giant “?” lights up in the center of the dashboard. “The experienced driver,” says Thompson, “will usually know what's wrong.” | ” |