nginx/src/core/ngx_rwlock.c


/*
 * Copyright (C) Ruslan Ermilov
 * Copyright (C) Nginx, Inc.
 */


#include <ngx_config.h>
#include <ngx_core.h>


#if (NGX_HAVE_ATOMIC_OPS)


#define NGX_RWLOCK_SPIN
#define NGX_RWLOCK_WLOCK


void
ngx_rwlock_wlock(ngx_atomic_t *lock)
{}


void
ngx_rwlock_rlock(ngx_atomic_t *lock)
{}


void
ngx_rwlock_unlock(ngx_atomic_t *lock)
{}


void
ngx_rwlock_downgrade(ngx_atomic_t *lock)
{}


#else

#if (NGX_HTTP_UPSTREAM_ZONE || NGX_STREAM_UPSTREAM_ZONE)

#error ngx_atomic_cmp_set() is not defined!

#endif

#endif