mirror of
https://github.com/nginx/nginx.git
synced 2025-06-29 02:30:39 +08:00
Added memory barrier semantics to ngx_rwlock_unlock().
This commit is contained in:
parent
8310d81dc7
commit
3f26c20756
@ -94,7 +94,7 @@ ngx_rwlock_unlock(ngx_atomic_t *lock)
|
|||||||
readers = *lock;
|
readers = *lock;
|
||||||
|
|
||||||
if (readers == NGX_RWLOCK_WLOCK) {
|
if (readers == NGX_RWLOCK_WLOCK) {
|
||||||
*lock = 0;
|
(void) ngx_atomic_cmp_set(lock, NGX_RWLOCK_WLOCK, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user