Custom rwlock data structure

This commit is contained in:
2024-04-13 22:49:49 +05:30
parent 861976fc69
commit 3e79c064a6
5 changed files with 421 additions and 1 deletions

View File

@@ -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 */