Added memory barrier semantics to ngx_rwlock_unlock().

This commit is contained in:
Ruslan Ermilov 2017-06-16 18:15:53 +03:00
parent 8310d81dc7
commit 3f26c20756

View File

@ -94,7 +94,7 @@ ngx_rwlock_unlock(ngx_atomic_t *lock)
readers = *lock;
if (readers == NGX_RWLOCK_WLOCK) {
*lock = 0;
(void) ngx_atomic_cmp_set(lock, NGX_RWLOCK_WLOCK, 0);
return;
}