smtx_lock(3) Library Functions Manual smtx_lock(3) NAME smtx_lock – acquire a spinlock SYNOPSIS library “threads” #include int smtx_lock(smtx_t *s); DESCRIPTION The function smtx_lock() will acquire a spinlock s. If the spinlock is already acquired it will loop until it can acquire the spinlock. If the current thread already has a lock on the given spinlock the behavior is undefined. RETURN VALUES Upon success smtx_lock() will return thrd_success. In case of error thrd_error will be returned. SEE ALSO smtx_init(3) smtx_destroy(3) smtx_unlock(3) smtx_trylock(3) HISTORY The smtx_lock() function first appeared in the Adelsbach Enhanced Threading Library. AUTHORS Jan Adelsbach Debian May 9, 2020 Debian