[nginx] Introduced worker number, ngx_worker.
Maxim Dounin
mdounin at mdounin.ru
Wed May 20 12:59:51 UTC 2015
details: http://hg.nginx.org/nginx/rev/b4cc553aafeb
branches:
changeset: 6151:b4cc553aafeb
user: Maxim Dounin <mdounin at mdounin.ru>
date: Wed May 20 15:51:21 2015 +0300
description:
Introduced worker number, ngx_worker.
diffstat:
src/os/unix/ngx_process_cycle.c | 2 ++
src/os/unix/ngx_process_cycle.h | 1 +
src/os/win32/ngx_process_cycle.c | 1 +
src/os/win32/ngx_process_cycle.h | 1 +
4 files changed, 5 insertions(+), 0 deletions(-)
diffs (52 lines):
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -29,6 +29,7 @@ static void ngx_cache_loader_process_han
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 *cy
ngx_connection_t *c;
ngx_process = NGX_PROCESS_WORKER;
+ ngx_worker = worker;
ngx_worker_process_init(cycle, worker);
diff --git a/src/os/unix/ngx_process_cycle.h b/src/os/unix/ngx_process_cycle.h
--- a/src/os/unix/ngx_process_cycle.h
+++ b/src/os/unix/ngx_process_cycle.h
@@ -39,6 +39,7 @@ void ngx_single_process_cycle(ngx_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;
diff --git a/src/os/win32/ngx_process_cycle.c b/src/os/win32/ngx_process_cycle.c
--- a/src/os/win32/ngx_process_cycle.c
+++ b/src/os/win32/ngx_process_cycle.c
@@ -29,6 +29,7 @@ static ngx_thread_value_t __stdcall ngx_
ngx_uint_t ngx_process;
+ngx_uint_t ngx_worker;
ngx_pid_t ngx_pid;
ngx_uint_t ngx_inherited;
diff --git a/src/os/win32/ngx_process_cycle.h b/src/os/win32/ngx_process_cycle.h
--- a/src/os/win32/ngx_process_cycle.h
+++ b/src/os/win32/ngx_process_cycle.h
@@ -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;
More information about the nginx-devel
mailing list