Adelsbach Enhanced Threading Library

Manual Pages (DD-00013-001)

Enhanced Threading Library > smtx_init (3)
HTML TXT PDF PS
smtx_init(3) Library Functions Manual smtx_init(3)

smtx_initinitialize a spinlock

library “threads”
#include <threadse.h>

int
smtx_init(smtx_t *s, int type);

The function () initializes a spinlock with the given type.

The type argument can be either of

the spinlock is not shared among child processes.
the spinlock is shared among child processes.

Upon success smtx_init() returns thrd_success, otherwise thrd_error will be returned.

smtx_destroy(3) smtx_lock(3) smtx_trylock(3) smtx_unlock(3)

The smtx_init() function first appeared in the Adelsbach Enhanced Threading Library.

Jan Adelsbach <jan@jadelsbach.de>

May 9, 2020 Debian