From c02473048cee372cb8644e1f2d566431781074d2 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 27 Jun 2004 18:01:57 +0000 Subject: nginx-0.0.7-2004-06-27-22:01:57 import --- src/os/unix/ngx_thread.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/os/unix/ngx_thread.h') 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 -- cgit v1.2.3