int
pthread_spin_unlock(pthread_spinlock_t *lock)
)
function is used to release the read/write lock previously obtained by
pthread_spin_lock()
or
pthread_spin_trylock().
)
function will return zero.
Otherwise an error number will be returned to indicate the error.
The results are undefined if
lock
is not held by the calling thread.
)
function may fail if:
EINVAL]lock
is invalid.
)
conforms to
IEEE Std 1003.1-2001 (``POSIX.1'') .
SCHED_FIFO, SCHED_RR)
should not use these interfaces.
Outside carefully controlled environments, priority inversion with spinlocks
can lead to system deadlock.
Mutexes are preferable in nearly every possible use case.