nginx-0.0.7-2004-07-05-10:55:54 import
diff --git a/src/core/nginx.c b/src/core/nginx.c
index f657efb..38418a8 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -35,6 +35,24 @@
offsetof(ngx_core_conf_t, worker_processes),
NULL },
+#if (NGX_THREADS)
+
+ { ngx_string("worker_threads"),
+ NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_num_slot,
+ 0,
+ offsetof(ngx_core_conf_t, worker_threads),
+ NULL },
+
+ { ngx_string("thread_stack_size"),
+ NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_size_slot,
+ 0,
+ offsetof(ngx_core_conf_t, thread_stack_size),
+ NULL },
+
+#endif
+
{ ngx_string("user"),
NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE12,
ngx_set_user,
@@ -106,12 +124,6 @@
ctx.argc = argc;
ctx.argv = argv;
-#if (NGX_THREADS)
- if (ngx_time_mutex_init(log) == NGX_ERROR) {
- return 1;
- }
-#endif
-
if (ngx_getopt(&ctx, &init_cycle) == NGX_ERROR) {
return 1;
}
@@ -341,6 +353,10 @@
ccf->daemon = NGX_CONF_UNSET;
ccf->master = NGX_CONF_UNSET;
ccf->worker_processes = NGX_CONF_UNSET;
+#if (NGX_THREADS)
+ ccf->worker_threads = NGX_CONF_UNSET;
+ ccf->thread_stack_size = NGX_CONF_UNSET;
+#endif
ccf->user = (ngx_uid_t) NGX_CONF_UNSET;
ccf->group = (ngx_gid_t) NGX_CONF_UNSET;
@@ -356,6 +372,12 @@
ngx_conf_init_value(ccf->master, 1);
ngx_conf_init_value(ccf->worker_processes, 1);
+#if (NGX_THREADS)
+ ngx_conf_init_value(ccf->worker_threads, 0);
+ ngx_threads_n = ccf->worker_threads;
+ ngx_conf_init_size_value(ccf->thread_stack_size, 2 * 1024 * 1024);
+#endif
+
#if !(WIN32)
/* TODO: default "nobody" user */