pthread_spin_unlock(3) - NetBSD Manual Pages

PTHREAD_SPIN_UNLOCK(3)  NetBSD Library Functions Manual PTHREAD_SPIN_UNLOCK(3)


NAME
pthread_spin_unlock -- release a spin lock
LIBRARY
POSIX Threads Library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h> int pthread_spin_unlock(pthread_spinlock_t *lock);
DESCRIPTION
The pthread_spin_unlock() function is used to release the read/write lock previously obtained by pthread_spin_lock() or pthread_spin_trylock().
RETURN VALUES
If successful, the pthread_spin_unlock() function will return zero. Oth- erwise an error number will be returned to indicate the error. The results are undefined if lock is not held by the calling thread.
ERRORS
The pthread_spin_unlock() function may fail if: [EINVAL] The value specified by lock is invalid.
SEE ALSO
pthread_spin_destroy(3), pthread_spin_init(3), pthread_spin_lock(3), pthread_spin_trylock(3)
STANDARDS
pthread_rwlock_unlock() conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
CAVEATS
Applications using spinlocks are vulnerable to the effects of priority inversion. Applications using real-time threads (SCHED_FIFO, SCHED_RR) should not use these interfaces. Outside carefully controlled environ- ments, priority inversion with spinlocks can lead to system deadlock. Mutexes are preferable in nearly every possible use case. NetBSD 5.1.2 May 26, 2008 NetBSD 5.1.2

Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.