Mercurial > hg > nginx
comparison src/os/unix/ngx_process_cycle.c @ 6016:457ec43dd8d5
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.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 04 Mar 2015 18:26:25 +0300 |
parents | 3efdd7788bb0 |
children | e284f3ff6831 |
comparison
equal
deleted
inserted
replaced
6015:e11a8e7e8e0c | 6016:457ec43dd8d5 |
---|---|
21 static void ngx_master_process_exit(ngx_cycle_t *cycle); | 21 static void ngx_master_process_exit(ngx_cycle_t *cycle); |
22 static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data); | 22 static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data); |
23 static void ngx_worker_process_init(ngx_cycle_t *cycle, ngx_int_t worker); | 23 static void ngx_worker_process_init(ngx_cycle_t *cycle, ngx_int_t worker); |
24 static void ngx_worker_process_exit(ngx_cycle_t *cycle); | 24 static void ngx_worker_process_exit(ngx_cycle_t *cycle); |
25 static void ngx_channel_handler(ngx_event_t *ev); | 25 static void ngx_channel_handler(ngx_event_t *ev); |
26 #if (NGX_THREADS) | 26 #if (NGX_OLD_THREADS) |
27 static void ngx_wakeup_worker_threads(ngx_cycle_t *cycle); | 27 static void ngx_wakeup_worker_threads(ngx_cycle_t *cycle); |
28 static ngx_thread_value_t ngx_worker_thread_cycle(void *data); | 28 static ngx_thread_value_t ngx_worker_thread_cycle(void *data); |
29 #endif | 29 #endif |
30 static void ngx_cache_manager_process_cycle(ngx_cycle_t *cycle, void *data); | 30 static void ngx_cache_manager_process_cycle(ngx_cycle_t *cycle, void *data); |
31 static void ngx_cache_manager_process_handler(ngx_event_t *ev); | 31 static void ngx_cache_manager_process_handler(ngx_event_t *ev); |
54 sig_atomic_t ngx_noaccept; | 54 sig_atomic_t ngx_noaccept; |
55 ngx_uint_t ngx_noaccepting; | 55 ngx_uint_t ngx_noaccepting; |
56 ngx_uint_t ngx_restart; | 56 ngx_uint_t ngx_restart; |
57 | 57 |
58 | 58 |
59 #if (NGX_THREADS) | 59 #if (NGX_OLD_THREADS) |
60 volatile ngx_thread_t ngx_threads[NGX_MAX_THREADS]; | 60 volatile ngx_thread_t ngx_threads[NGX_MAX_THREADS]; |
61 ngx_int_t ngx_threads_n; | 61 ngx_int_t ngx_threads_n; |
62 #endif | 62 #endif |
63 | 63 |
64 | 64 |
745 | 745 |
746 ngx_worker_process_init(cycle, worker); | 746 ngx_worker_process_init(cycle, worker); |
747 | 747 |
748 ngx_setproctitle("worker process"); | 748 ngx_setproctitle("worker process"); |
749 | 749 |
750 #if (NGX_THREADS) | 750 #if (NGX_OLD_THREADS) |
751 { | 751 { |
752 ngx_int_t n; | 752 ngx_int_t n; |
753 ngx_err_t err; | 753 ngx_err_t err; |
754 ngx_core_conf_t *ccf; | 754 ngx_core_conf_t *ccf; |
755 | 755 |
1030 ngx_worker_process_exit(ngx_cycle_t *cycle) | 1030 ngx_worker_process_exit(ngx_cycle_t *cycle) |
1031 { | 1031 { |
1032 ngx_uint_t i; | 1032 ngx_uint_t i; |
1033 ngx_connection_t *c; | 1033 ngx_connection_t *c; |
1034 | 1034 |
1035 #if (NGX_THREADS) | 1035 #if (NGX_OLD_THREADS) |
1036 ngx_terminate = 1; | 1036 ngx_terminate = 1; |
1037 | 1037 |
1038 ngx_wakeup_worker_threads(cycle); | 1038 ngx_wakeup_worker_threads(cycle); |
1039 #endif | 1039 #endif |
1040 | 1040 |
1179 } | 1179 } |
1180 } | 1180 } |
1181 } | 1181 } |
1182 | 1182 |
1183 | 1183 |
1184 #if (NGX_THREADS) | 1184 #if (NGX_OLD_THREADS) |
1185 | 1185 |
1186 static void | 1186 static void |
1187 ngx_wakeup_worker_threads(ngx_cycle_t *cycle) | 1187 ngx_wakeup_worker_threads(ngx_cycle_t *cycle) |
1188 { | 1188 { |
1189 ngx_int_t i; | 1189 ngx_int_t i; |