Renamed NGX_THREADS to NGX_OLD_THREADS because of deprecation.
It's mostly dead code and the original idea of worker threads has been rejected.
diff --git a/src/core/nginx.c b/src/core/nginx.c
index c75ee4f..feb861a 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -139,7 +139,7 @@
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 @@
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 @@
#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 d6c0bda..896b775 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -943,7 +943,7 @@
}
}
-#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 143cab7..207aea4 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -184,7 +184,7 @@
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 d69783f..11e413f 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -26,7 +26,7 @@
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 21bf5ca..be90a72 100644
--- a/src/core/ngx_cycle.h
+++ b/src/core/ngx_cycle.h
@@ -103,7 +103,7 @@
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 @@
} 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_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 30acca5..77c5947 100644
--- a/src/core/ngx_regex.c
+++ b/src/core/ngx_regex.c
@@ -80,7 +80,7 @@
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 @@
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 @@
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 9c93afa..33477e2 100644
--- a/src/core/ngx_spinlock.c
+++ b/src/core/ngx_spinlock.c
@@ -42,7 +42,7 @@
#else
-#if (NGX_THREADS)
+#if (NGX_OLD_THREADS)
#error ngx_spinlock() or ngx_atomic_cmp_set() are not defined !