pthread_spin_lock(3) Library Functions Manual pthread_spin_lock(3) pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock - POSIX (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() 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. . pthread_spin_init(3) . pthread_spin_destroy(3), pthread_spin_init(3), pthreads(7) 3 . . : . 6.18 8 2026 pthread_spin_lock(3)