Skip to content
Snippets Groups Projects
Commit 1220c4b5 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Don't leve the wlk critical section on wrlock success.

That *is* the write lock!
parent b7dd7b56
No related branches found
No related tags found
No related merge requests found
Pipeline #7779 passed
...@@ -146,7 +146,8 @@ rwlock_wrlock(rwlock_t *lock) ...@@ -146,7 +146,8 @@ rwlock_wrlock(rwlock_t *lock)
ret = true; ret = true;
} }
LeaveCriticalSection(&lock->lk); LeaveCriticalSection(&lock->lk);
LeaveCriticalSection(&lock->wlk); if (!ret)
LeaveCriticalSection(&lock->wlk);
return ret; return ret;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment