]> git.kaiwu.me - nginx.git/commitdiff
Introduced worker number, ngx_worker.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 20 May 2015 12:51:21 +0000 (15:51 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 20 May 2015 12:51:21 +0000 (15:51 +0300)
src/os/unix/ngx_process_cycle.c
src/os/unix/ngx_process_cycle.h
src/os/win32/ngx_process_cycle.c
src/os/win32/ngx_process_cycle.h

index 50676326ff30cf531676133f2ec10ca654cfbe23..c69932ecd6ede8826cd3c9234526dd4162658246 100644 (file)
@@ -29,6 +29,7 @@ static void ngx_cache_loader_process_handler(ngx_event_t *ev);
 
 
 ngx_uint_t    ngx_process;
+ngx_uint_t    ngx_worker;
 ngx_pid_t     ngx_pid;
 
 sig_atomic_t  ngx_reap;
@@ -731,6 +732,7 @@ ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
     ngx_connection_t  *c;
 
     ngx_process = NGX_PROCESS_WORKER;
+    ngx_worker = worker;
 
     ngx_worker_process_init(cycle, worker);
 
index d44c377ce739630cc26de6de3e5b4ee317c7fc1f..69495d5f4553ea6fa2c57d98580d2c45bd4ba683 100644 (file)
@@ -39,6 +39,7 @@ void ngx_single_process_cycle(ngx_cycle_t *cycle);
 
 
 extern ngx_uint_t      ngx_process;
+extern ngx_uint_t      ngx_worker;
 extern ngx_pid_t       ngx_pid;
 extern ngx_pid_t       ngx_new_binary;
 extern ngx_uint_t      ngx_inherited;
index acd70cf78672dac5b47b0200587f498fba48a5bc..203bece3f5de9498bc189c96388d5ffb149733ae 100644 (file)
@@ -29,6 +29,7 @@ static ngx_thread_value_t __stdcall ngx_cache_loader_thread(void *data);
 
 
 ngx_uint_t     ngx_process;
+ngx_uint_t     ngx_worker;
 ngx_pid_t      ngx_pid;
 
 ngx_uint_t     ngx_inherited;
index f38c3888521cdaffce7899457f5dc0683a122a8c..95d2743509580435032f96c2688ff4218ff4bda4 100644 (file)
@@ -25,6 +25,7 @@ void ngx_close_handle(HANDLE h);
 
 
 extern ngx_uint_t      ngx_process;
+extern ngx_uint_t      ngx_worker;
 extern ngx_pid_t       ngx_pid;
 extern ngx_uint_t      ngx_exiting;