diff options
Diffstat (limited to 'src/os/unix')
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 10 | ||||
-rw-r--r-- | src/os/unix/ngx_thread.h | 4 | ||||
-rw-r--r-- | src/os/unix/ngx_user.c | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index 51cf72544..83d65dde6 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -23,7 +23,7 @@ static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data); static void ngx_worker_process_init(ngx_cycle_t *cycle, ngx_int_t worker); static void ngx_worker_process_exit(ngx_cycle_t *cycle); static void ngx_channel_handler(ngx_event_t *ev); -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) static void ngx_wakeup_worker_threads(ngx_cycle_t *cycle); static ngx_thread_value_t ngx_worker_thread_cycle(void *data); #endif @@ -56,7 +56,7 @@ ngx_uint_t ngx_noaccepting; ngx_uint_t ngx_restart; -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) volatile ngx_thread_t ngx_threads[NGX_MAX_THREADS]; ngx_int_t ngx_threads_n; #endif @@ -747,7 +747,7 @@ ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data) ngx_setproctitle("worker process"); -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) { ngx_int_t n; ngx_err_t err; @@ -1032,7 +1032,7 @@ ngx_worker_process_exit(ngx_cycle_t *cycle) ngx_uint_t i; ngx_connection_t *c; -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) ngx_terminate = 1; ngx_wakeup_worker_threads(cycle); @@ -1181,7 +1181,7 @@ ngx_channel_handler(ngx_event_t *ev) } -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) static void ngx_wakeup_worker_threads(ngx_cycle_t *cycle) diff --git a/src/os/unix/ngx_thread.h b/src/os/unix/ngx_thread.h index 49c5d5656..2077b3df6 100644 --- a/src/os/unix/ngx_thread.h +++ b/src/os/unix/ngx_thread.h @@ -12,7 +12,7 @@ #include <ngx_config.h> #include <ngx_core.h> -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) #define NGX_MAX_THREADS 128 @@ -107,7 +107,7 @@ ngx_int_t ngx_cond_wait(ngx_cond_t *cv, ngx_mutex_t *m); ngx_int_t ngx_cond_signal(ngx_cond_t *cv); -#else /* !NGX_THREADS */ +#else /* !NGX_OLD_THREADS */ #define ngx_thread_volatile diff --git a/src/os/unix/ngx_user.c b/src/os/unix/ngx_user.c index 3491f1c9e..4ac969fd9 100644 --- a/src/os/unix/ngx_user.c +++ b/src/os/unix/ngx_user.c @@ -64,7 +64,7 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted) size_t len; ngx_err_t err; -#if (NGX_THREADS && NGX_NONREENTRANT_CRYPT) +#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT) /* crypt() is a time consuming function, so we only try to lock */ @@ -81,14 +81,14 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted) *encrypted = ngx_pnalloc(pool, len); if (*encrypted == NULL) { -#if (NGX_THREADS && NGX_NONREENTRANT_CRYPT) +#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT) ngx_mutex_unlock(ngx_crypt_mutex); #endif return NGX_ERROR; } ngx_memcpy(*encrypted, value, len); -#if (NGX_THREADS && NGX_NONREENTRANT_CRYPT) +#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT) ngx_mutex_unlock(ngx_crypt_mutex); #endif return NGX_OK; @@ -96,7 +96,7 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted) err = ngx_errno; -#if (NGX_THREADS && NGX_NONREENTRANT_CRYPT) +#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT) ngx_mutex_unlock(ngx_crypt_mutex); #endif |