comparison src/os/win32/ngx_process_cycle.c @ 6111:537259db5af4

Removed "worker_threads" and "thread_stack_size" directives.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 26 Mar 2015 14:15:17 +0300
parents 16c51e80128c
children b4cc553aafeb
comparison
equal deleted inserted replaced
6110:16c51e80128c 6111:537259db5af4
9 #include <ngx_core.h> 9 #include <ngx_core.h>
10 #include <ngx_event.h> 10 #include <ngx_event.h>
11 #include <nginx.h> 11 #include <nginx.h>
12 12
13 13
14 static void ngx_process_init(ngx_cycle_t *cycle);
15 static void ngx_console_init(ngx_cycle_t *cycle); 14 static void ngx_console_init(ngx_cycle_t *cycle);
16 static int __stdcall ngx_console_handler(u_long type); 15 static int __stdcall ngx_console_handler(u_long type);
17 static ngx_int_t ngx_create_signal_events(ngx_cycle_t *cycle); 16 static ngx_int_t ngx_create_signal_events(ngx_cycle_t *cycle);
18 static ngx_int_t ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t type); 17 static ngx_int_t ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t type);
19 static void ngx_reopen_worker_processes(ngx_cycle_t *cycle); 18 static void ngx_reopen_worker_processes(ngx_cycle_t *cycle);
67 ngx_int_t n; 66 ngx_int_t n;
68 ngx_msec_t timer; 67 ngx_msec_t timer;
69 ngx_uint_t live; 68 ngx_uint_t live;
70 HANDLE events[MAXIMUM_WAIT_OBJECTS]; 69 HANDLE events[MAXIMUM_WAIT_OBJECTS];
71 70
72 ngx_process_init(cycle);
73
74 ngx_sprintf((u_char *) ngx_master_process_event_name, 71 ngx_sprintf((u_char *) ngx_master_process_event_name,
75 "ngx_master_%s%Z", ngx_unique); 72 "ngx_master_%s%Z", ngx_unique);
76 73
77 if (ngx_process == NGX_PROCESS_WORKER) { 74 if (ngx_process == NGX_PROCESS_WORKER) {
78 ngx_worker_process_cycle(cycle, ngx_master_process_event_name); 75 ngx_worker_process_cycle(cycle, ngx_master_process_event_name);
244 continue; 241 continue;
245 } 242 }
246 243
247 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, 244 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
248 "WaitForMultipleObjects() returned unexpected value %ul", ev); 245 "WaitForMultipleObjects() returned unexpected value %ul", ev);
249 }
250 }
251
252
253 static void
254 ngx_process_init(ngx_cycle_t *cycle)
255 {
256 ngx_core_conf_t *ccf;
257
258 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
259
260 if (ngx_init_threads(ngx_threads_n, ccf->thread_stack_size, cycle)
261 != NGX_OK)
262 {
263 /* fatal */
264 exit(2);
265 } 246 }
266 } 247 }
267 248
268 249
269 static void 250 static void
1014 void 995 void
1015 ngx_single_process_cycle(ngx_cycle_t *cycle) 996 ngx_single_process_cycle(ngx_cycle_t *cycle)
1016 { 997 {
1017 ngx_tid_t tid; 998 ngx_tid_t tid;
1018 999
1019 ngx_process_init(cycle);
1020
1021 ngx_console_init(cycle); 1000 ngx_console_init(cycle);
1022 1001
1023 if (ngx_create_signal_events(cycle) != NGX_OK) { 1002 if (ngx_create_signal_events(cycle) != NGX_OK) {
1024 exit(2); 1003 exit(2);
1025 } 1004 }