diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/nginx.c | 6 | ||||
| -rw-r--r-- | src/core/ngx_connection.c | 2 | ||||
| -rw-r--r-- | src/core/ngx_connection.h | 2 | ||||
| -rw-r--r-- | src/core/ngx_cycle.c | 2 | ||||
| -rw-r--r-- | src/core/ngx_cycle.h | 8 | ||||
| -rw-r--r-- | src/core/ngx_regex.c | 6 | ||||
| -rw-r--r-- | src/core/ngx_spinlock.c | 2 |
7 files changed, 16 insertions, 12 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c index c75ee4fd7..feb861a11 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -139,7 +139,7 @@ static ngx_command_t ngx_core_commands[] = { 0, NULL }, -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) { ngx_string("worker_threads"), NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1, @@ -959,7 +959,7 @@ ngx_core_module_create_conf(ngx_cycle_t *cycle) ccf->user = (ngx_uid_t) NGX_CONF_UNSET_UINT; ccf->group = (ngx_gid_t) NGX_CONF_UNSET_UINT; -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) ccf->worker_threads = NGX_CONF_UNSET; ccf->thread_stack_size = NGX_CONF_UNSET_SIZE; #endif @@ -1000,7 +1000,7 @@ ngx_core_module_init_conf(ngx_cycle_t *cycle, void *conf) #endif -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) ngx_conf_init_value(ccf->worker_threads, 0); ngx_threads_n = ccf->worker_threads; diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index d6c0bdadc..896b775c5 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -943,7 +943,7 @@ ngx_close_connection(ngx_connection_t *c) } } -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) /* * we have to clean the connection information before the closing diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h index 143cab7b3..207aea4f5 100644 --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -184,7 +184,7 @@ struct ngx_connection_s { unsigned busy_count:2; #endif -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) ngx_atomic_t lock; #endif }; diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c index d69783fec..11e413f4e 100644 --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -26,7 +26,7 @@ static ngx_event_t ngx_cleaner_event; ngx_uint_t ngx_test_config; ngx_uint_t ngx_quiet_mode; -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) ngx_tls_key_t ngx_core_tls_key; #endif diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h index 21bf5ca3f..be90a7281 100644 --- a/src/core/ngx_cycle.h +++ b/src/core/ngx_cycle.h @@ -103,7 +103,7 @@ typedef struct { ngx_array_t env; char **environment; -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) ngx_int_t worker_threads; size_t thread_stack_size; #endif @@ -111,10 +111,14 @@ typedef struct { } ngx_core_conf_t; +#if (NGX_OLD_THREADS) + typedef struct { ngx_pool_t *pool; /* pcre's malloc() pool */ } ngx_core_tls_t; +#endif + #define ngx_is_init_cycle(cycle) (cycle->conf_ctx == NULL) @@ -136,7 +140,7 @@ extern ngx_array_t ngx_old_cycles; extern ngx_module_t ngx_core_module; extern ngx_uint_t ngx_test_config; extern ngx_uint_t ngx_quiet_mode; -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) extern ngx_tls_key_t ngx_core_tls_key; #endif diff --git a/src/core/ngx_regex.c b/src/core/ngx_regex.c index 30acca5fc..77c5947de 100644 --- a/src/core/ngx_regex.c +++ b/src/core/ngx_regex.c @@ -80,7 +80,7 @@ ngx_regex_init(void) static ngx_inline void ngx_regex_malloc_init(ngx_pool_t *pool) { -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) ngx_core_tls_t *tls; if (ngx_threaded) { @@ -98,7 +98,7 @@ ngx_regex_malloc_init(ngx_pool_t *pool) static ngx_inline void ngx_regex_malloc_done(void) { -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) ngx_core_tls_t *tls; if (ngx_threaded) { @@ -253,7 +253,7 @@ static void * ngx_libc_cdecl ngx_regex_malloc(size_t size) { ngx_pool_t *pool; -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) ngx_core_tls_t *tls; if (ngx_threaded) { diff --git a/src/core/ngx_spinlock.c b/src/core/ngx_spinlock.c index 9c93afaf1..33477e2ee 100644 --- a/src/core/ngx_spinlock.c +++ b/src/core/ngx_spinlock.c @@ -42,7 +42,7 @@ ngx_spinlock(ngx_atomic_t *lock, ngx_atomic_int_t value, ngx_uint_t spin) #else -#if (NGX_THREADS) +#if (NGX_OLD_THREADS) #error ngx_spinlock() or ngx_atomic_cmp_set() are not defined ! |
