Searched refs:w_lock (Results 1 – 1 of 1) sorted by relevance
31 sem_t r_lock, w_lock; variable58 if (-1 == sem_wait(&w_lock)) { in reader()75 if (-1 == sem_post(&w_lock)) { in reader()95 if (-1 == sem_wait(&w_lock)) { in writer()100 if (-1 == sem_post(&w_lock)) { in writer()125 if (-1 == sem_init(&w_lock, shared, w_value)) { in main()148 if (-1 == sem_destroy(&w_lock)) { in main()