pthread_spin_lock(3) Library Functions Manual pthread_spin_lock(3) pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock - (spin lock) LIBRARY 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 , Kogan, Max Is , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . pthread_spin_lock(3)