aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_thread.h')
-rw-r--r--src/os/unix/ngx_thread.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/os/unix/ngx_thread.h b/src/os/unix/ngx_thread.h
index 52252747e..6412fe8b2 100644
--- a/src/os/unix/ngx_thread.h
+++ b/src/os/unix/ngx_thread.h
@@ -36,6 +36,11 @@ typedef volatile struct {
} ngx_mutex_t;
+typedef struct {
+ ngx_mutex_t mutex;
+} ngx_cv_t;
+
+
#define ngx_thread_sigmask(how, set, oset) \
(sigprocmask(how, set, oset) == -1) ? ngx_errno : 0
@@ -102,6 +107,12 @@ ngx_int_t ngx_mutex_dolock(ngx_mutex_t *m, ngx_int_t try);
ngx_int_t ngx_mutex_unlock(ngx_mutex_t *m);
+ngx_cv_t *ngx_cv_init(ngx_log_t *log);
+void ngx_cv_done(ngx_cv_t *cv);
+ngx_int_t ngx_cv_wait(ngx_cv_t *cv);
+ngx_int_t ngx_cv_signal(ngx_cv_t *cv);
+
+
#else /* !NGX_THREADS */
#define ngx_thread_volatile