smtx_init(3) | Library Functions Manual | smtx_init(3) |
NAME
smtx_init
—
initialize a spinlock
SYNOPSIS
library “threads”
#include <threadse.h>
int
smtx_init
(smtx_t
*s, int type);
DESCRIPTION
The function
smtx_init
()
initializes a spinlock with the given type.
The type argument can be either of
- smtx_private
- the spinlock is not shared among child processes.
- the spinlock is shared among child processes.
RETURN VALUES
Upon success smtx_init
() returns
thrd_success, otherwise
thrd_error will be returned.
SEE ALSO
HISTORY
The smtx_init
() function first appeared in
the Adelsbach Enhanced Threading Library.
AUTHORS
Jan Adelsbach <jan@jadelsbach.de>
May 9, 2020 | Debian |