pthread_spin_lock(3) Library Functions Manual pthread_spin_lock(3) pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock - (spin lock) POSIX threads library (libpthread, -lpthread) #include int pthread_spin_lock(pthread_spinlock_t *lock); int pthread_spin_trylock(pthread_spinlock_t *lock); int pthread_spin_unlock(pthread_spinlock_t *lock); glibc (. feature_test_macros(7)): pthread_spin_lock(), pthread_spin_trylock(): _POSIX_C_SOURCE >= 200112L pthread_spin_lock() (spin lock), lock. , . , , , . pthread_spin_lock() , pthread_spin_init(3), . pthread_spin_trylock() pthread_spin_lock(), , , lock , EBUSY. pthread_spin_unlock() , lock. - , . pthread_spin_unlock() , , . . . pthread_spin_lock() : EDEADLOCK . pthread_spin_trylock() : EBUSY . POSIX.1-2008. glibc 2.2. POSIX.1-2001. CAVEATS . pthread_spin_init(3). pthread_spin_destroy(3), pthread_spin_init(3), pthreads(7) () Alexey, Azamat Hackimov , kogamatranslator49 , Darima Kogan , Max Is , Yuri Kozlov , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux man-pages 6.12 23 2024 . pthread_spin_lock(3)