mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
Introduced ngx_rwlock_downgrade().
This commit is contained in:
parent
3f26c20756
commit
6a4a1f0e23
@ -109,6 +109,15 @@ ngx_rwlock_unlock(ngx_atomic_t *lock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ngx_rwlock_downgrade(ngx_atomic_t *lock)
|
||||||
|
{
|
||||||
|
if (*lock == NGX_RWLOCK_WLOCK) {
|
||||||
|
*lock = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if (NGX_HTTP_UPSTREAM_ZONE || NGX_STREAM_UPSTREAM_ZONE)
|
#if (NGX_HTTP_UPSTREAM_ZONE || NGX_STREAM_UPSTREAM_ZONE)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
void ngx_rwlock_wlock(ngx_atomic_t *lock);
|
void ngx_rwlock_wlock(ngx_atomic_t *lock);
|
||||||
void ngx_rwlock_rlock(ngx_atomic_t *lock);
|
void ngx_rwlock_rlock(ngx_atomic_t *lock);
|
||||||
void ngx_rwlock_unlock(ngx_atomic_t *lock);
|
void ngx_rwlock_unlock(ngx_atomic_t *lock);
|
||||||
|
void ngx_rwlock_downgrade(ngx_atomic_t *lock);
|
||||||
|
|
||||||
|
|
||||||
#endif /* _NGX_RWLOCK_H_INCLUDED_ */
|
#endif /* _NGX_RWLOCK_H_INCLUDED_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user