mirror of
https://github.com/Hizenberg469/MultiThreading_Part_A.git
synced 2026-04-20 02:22:23 +03:00
Custom rwlock data structure
This commit is contained in:
@@ -9,7 +9,7 @@ static int n_w = 0;
|
||||
pthread_mutex_t state_check_mutex;
|
||||
|
||||
static void
|
||||
cs_static_check() {
|
||||
cs_status_check() {
|
||||
|
||||
pthread_mutex_lock(&state_check_mutex);
|
||||
assert(n_r >= 0 && n_w >= 0); /* cannot be negative */
|
||||
|
||||
Reference in New Issue
Block a user