pthread_spin_init(3) Library Functions Manual pthread_spin_init(3) pthread_spin_init, pthread_spin_destroy - POSIX (libpthread -lpthread) #include int pthread_spin_init(pthread_spinlock_t *lock, int pshared); int pthread_spin_destroy(pthread_spinlock_t *lock); glibc ( feature_test_macros(7)): pthread_spin_init() pthread_spin_destroy(): _POSIX_C_SOURCE >= 200112L : . . . pthread_spin_init() lock . pshared : PTHREAD_PROCESS_PRIVATE pthread_spin_init(). ( .) PTHREAD_PROCESS_SHARED ( ). pthread_spin_init() . pthread_spin_destroy() . . pthread_spin_init() . pthread_spin_lock(3) pthread_spin_unlock(3) pthread_spin_destroy() lock . . . pthread_spin_init() . pthread_spin_init() : EAGAIN . ENOMEM . POSIX.1-2008. glibc 2.2. POSIX.1-2001. POSIX. glibc. (SCHED_FIFO SCHED_RR). SCHED_OTHER . . . . . . pthread_mutex_init(3) pthread_mutex_lock(3) pthread_spin_lock(3) pthread_spin_unlock(3) pthreads(7) 3 . . : . 6.18 8 2026 pthread_spin_init(3)