3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Nginx, Inc.
8 #ifndef _NGX_SHMTX_H_INCLUDED_
9 #define _NGX_SHMTX_H_INCLUDED_
12 #include <ngx_config.h>
18 #if (NGX_HAVE_POSIX_SEM)
25 #if (NGX_HAVE_ATOMIC_OPS)
27 #if (NGX_HAVE_POSIX_SEM)
40 ngx_int_t
ngx_shmtx_create(ngx_shmtx_t
*mtx
, ngx_shmtx_sh_t
*addr
,
42 void ngx_shmtx_destroy(ngx_shmtx_t
*mtx
);
43 ngx_uint_t
ngx_shmtx_trylock(ngx_shmtx_t
*mtx
);
44 void ngx_shmtx_lock(ngx_shmtx_t
*mtx
);
45 void ngx_shmtx_unlock(ngx_shmtx_t
*mtx
);
46 ngx_uint_t
ngx_shmtx_force_unlock(ngx_shmtx_t
*mtx
, ngx_pid_t pid
);
49 #endif /* _NGX_SHMTX_H_INCLUDED_ */