Multithreaded Programming Guide

Initializing Read-Write Locks With Intraprocess Scope

#include <thread.h> 
rwlock_t rwlp; 
int ret; 
/* to be used within this process only */ 
ret = rwlock_init(&rwlp, USYNC_THREAD, 0);