| 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.
| “ | Our grievance is not just against Unix itself, but against the cult of Unix zealots who defend and nurture it. They take the heat, disease, and pestilence as givens, and, as ancient shamans did, display their wounds, some self-inflicted, as proof of their power and wizardry. We aim, through bluntness and humor, to show them that they pray to a tin god, and that science, not religion, is the path to useful and friendly technology. | ” |
| — The Unix Haters' handbook | ||