rwmtx_init(3)		   Library Functions Manual		 rwmtx_init(3)

NAME
     rwmtx_init – initialize a read/write lock

SYNOPSIS
     library “threads”
     #include <threadse.h>

     int
     rwmtx_init(rwmtx_t *rw, int type);

DESCRIPTION
     The function rwmtx_init() initializes a read/write lock rw of the given
     type.

     The type argument can be either of

     rwmtx_private
	     the read/write lock is not shared among child processes.

     rwmtx_shared
	     the read/write lock is shared among child processes.

RETURN VALUES
     Upon success rwmtx_init() returns thrd_success, otherwise thrd_error will
     be returned.

SEE ALSO
     rwmtx_destroy(3) rwmtx_rdlock(3) rwmtx_wrlock(3) rwmtx_tryrdlock(3)
     rwmtx_trywrlock(3) rwmtx_timedrdlock(3) rwmtx_timedwrlock(3)
     rwmtx_unlock(3)

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

AUTHORS
     Jan Adelsbach <jan@jadelsbach.de>

Linux 6.13.6-1-default		  May 9, 2020		Linux 6.13.6-1-default