diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-06-28 21:03:14 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-06-28 21:03:14 +0000 |
commit | 0a94cfd2ae9ca87b4d988b5066f739a3034f3bff (patch) | |
tree | e212b04fb2cb88f5f0accb9086a5c9eb3b9cd56e /src/os/unix | |
parent | b14b91020284baf090b40bdb6ba87b99751f27fb (diff) | |
download | nginx-0a94cfd2ae9ca87b4d988b5066f739a3034f3bff.tar.gz nginx-0a94cfd2ae9ca87b4d988b5066f739a3034f3bff.zip |
nginx-0.0.7-2004-06-29-01:03:14 import
Diffstat (limited to 'src/os/unix')
-rw-r--r-- | src/os/unix/ngx_freebsd_rfork_thread.c | 7 | ||||
-rw-r--r-- | src/os/unix/ngx_thread.h | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/os/unix/ngx_freebsd_rfork_thread.c b/src/os/unix/ngx_freebsd_rfork_thread.c index 73c515221..2c8dc69d0 100644 --- a/src/os/unix/ngx_freebsd_rfork_thread.c +++ b/src/os/unix/ngx_freebsd_rfork_thread.c @@ -399,6 +399,10 @@ ngx_int_t ngx_mutex_dolock(ngx_mutex_t *m, ngx_int_t try) return NGX_ERROR; } + ngx_log_debug2(NGX_LOG_DEBUG_CORE, m->log, 0, + "mutex waked up " PTR_FMT " lock:%X", + m, m->lock); + tries = 0; old = m->lock; continue; @@ -505,6 +509,9 @@ ngx_int_t ngx_mutex_unlock(ngx_mutex_t *m) /* wake up the thread that waits on semaphore */ + ngx_log_debug1(NGX_LOG_DEBUG_CORE, m->log, 0, + "wake up mutex " PTR_FMT "", m); + op.sem_num = 0; op.sem_op = 1; op.sem_flg = SEM_UNDO; diff --git a/src/os/unix/ngx_thread.h b/src/os/unix/ngx_thread.h index c91ff9986..a1404038e 100644 --- a/src/os/unix/ngx_thread.h +++ b/src/os/unix/ngx_thread.h @@ -77,6 +77,8 @@ static inline int ngx_gettid() } +#define ngx_thread_main() (ngx_gettid() == 0) + #else /* use pthreads */ @@ -124,6 +126,10 @@ ngx_int_t ngx_cond_signal(ngx_cond_t *cv); #define ngx_mutex_lock(m) NGX_OK #define ngx_mutex_unlock(m) +#define ngx_cond_signal(cv) + +#define ngx_thread_main() 1 + #endif |