pthread_spin_destroy(3) - NetBSD Manual Pages

PTHREAD_SPIN_DESTROY(3) NetBSD Library Functions ManualPTHREAD_SPIN_DESTROY(3)


NAME
pthread_spin_destroy -- destroy a spin lock
LIBRARY
POSIX Threads Library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h> int pthread_spin_destroy(pthread_spinlock_t *lock);
DESCRIPTION
The pthread_spin_destroy() function is used to destroy a spin lock previ- ously created with pthread_spin_init().
RETURN VALUES
If successful, the pthread_spin_destroy() function will return zero. Otherwise an error number will be returned to indicate the error.
ERRORS
The pthread_spin_destroy() function may fail if: [EBUSY] The system has detected an attempt to destroy the object referenced by lock while it is locked. [EINVAL] The value specified by lock is invalid.
SEE ALSO
pthread_spin_init(3), pthread_spin_lock(3), pthread_spin_trylock(3), pthread_spin_unlock(3)
STANDARDS
pthread_spin_destroy() 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.