diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-06-28 20:05:02 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-06-28 20:05:02 +0400 |
commit | b14b91020284baf090b40bdb6ba87b99751f27fb (patch) | |
tree | 5c0a3b3cd099910a1d9698b6972db858839b3067 /src/os/unix/ngx_process_cycle.c | |
parent | c02473048cee372cb8644e1f2d566431781074d2 (diff) |
nginx-0.0.7-2004-06-28-20:05:02 import
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index 6d7fe06c2..dd50bba25 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -625,14 +625,12 @@ static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data) exit(2); } - if (!(ngx_posted_events_cv = ngx_cv_init(cycle->log))) { + if (!(ngx_posted_events_cv = ngx_cond_init(cycle->log))) { /* fatal */ exit(2); } - ngx_posted_events_mutex = &ngx_posted_events_cv->mutex; - - for (i = 0; i < 1; i++) { + for (i = 0; i < 2; i++) { if (ngx_create_thread(&tid, ngx_worker_thread_cycle, cycle, cycle->log) != 0) { @@ -780,7 +778,9 @@ int ngx_worker_thread_cycle(void *data) ngx_setproctitle("worker thread"); for ( ;; ) { - if (ngx_cv_wait(ngx_posted_events_cv) == NGX_ERROR) { + if (ngx_cond_wait(ngx_posted_events_cv, ngx_posted_events_mutex) + == NGX_ERROR) + { return 1; } |