Mercurial > hg > nginx-quic
annotate src/core/ngx_cycle.h @ 2153:6476e445d6ce
xsl:output's media-type and encoding support
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 05 Aug 2008 14:24:16 +0000 |
parents | 01b71aa095cc |
children | d5896f6608e8 |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
414
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
414
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
414
diff
changeset
|
4 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
414
diff
changeset
|
5 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
414
diff
changeset
|
6 |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 #ifndef _NGX_CYCLE_H_INCLUDED_ |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #define _NGX_CYCLE_H_INCLUDED_ |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 #include <ngx_config.h> |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
12 #include <ngx_core.h> |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
507 | 15 #ifndef NGX_CYCLE_POOL_SIZE |
16 #define NGX_CYCLE_POOL_SIZE 16384 | |
17 #endif | |
18 | |
19 | |
461 | 20 #define NGX_DEBUG_POINTS_STOP 1 |
21 #define NGX_DEBUG_POINTS_ABORT 2 | |
22 | |
23 | |
972 | 24 typedef struct ngx_shm_zone_s ngx_shm_zone_t; |
25 | |
993
1b9a4d92173f
pass the inherited shm_zone data
Igor Sysoev <igor@sysoev.ru>
parents:
972
diff
changeset
|
26 typedef ngx_int_t (*ngx_shm_zone_init_pt) (ngx_shm_zone_t *zone, void *data); |
972 | 27 |
28 struct ngx_shm_zone_s { | |
29 void *data; | |
860
201d017ea470
slab allocator in shared memory
Igor Sysoev <igor@sysoev.ru>
parents:
611
diff
changeset
|
30 ngx_shm_t shm; |
972 | 31 ngx_shm_zone_init_pt init; |
860
201d017ea470
slab allocator in shared memory
Igor Sysoev <igor@sysoev.ru>
parents:
611
diff
changeset
|
32 ngx_str_t name; |
972 | 33 void *tag; |
34 }; | |
860
201d017ea470
slab allocator in shared memory
Igor Sysoev <igor@sysoev.ru>
parents:
611
diff
changeset
|
35 |
201d017ea470
slab allocator in shared memory
Igor Sysoev <igor@sysoev.ru>
parents:
611
diff
changeset
|
36 |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
37 struct ngx_cycle_s { |
473 | 38 void ****conf_ctx; |
39 ngx_pool_t *pool; | |
317
1308b98496a2
nginx-0.0.3-2004-04-15-19:34:36 import
Igor Sysoev <igor@sysoev.ru>
parents:
311
diff
changeset
|
40 |
473 | 41 ngx_log_t *log; |
42 ngx_log_t *new_log; | |
317
1308b98496a2
nginx-0.0.3-2004-04-15-19:34:36 import
Igor Sysoev <igor@sysoev.ru>
parents:
311
diff
changeset
|
43 |
543 | 44 ngx_connection_t **files; |
45 ngx_connection_t *free_connections; | |
46 ngx_uint_t free_connection_n; | |
47 | |
473 | 48 ngx_array_t listening; |
49 ngx_array_t pathes; | |
50 ngx_list_t open_files; | |
860
201d017ea470
slab allocator in shared memory
Igor Sysoev <igor@sysoev.ru>
parents:
611
diff
changeset
|
51 ngx_list_t shared_memory; |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
52 |
473 | 53 ngx_uint_t connection_n; |
543 | 54 ngx_uint_t files_n; |
55 | |
561 | 56 ngx_connection_t *connections; |
57 ngx_event_t *read_events; | |
58 ngx_event_t *write_events; | |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
59 |
473 | 60 ngx_cycle_t *old_cycle; |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
61 |
473 | 62 ngx_str_t conf_file; |
2073 | 63 ngx_str_t conf_param; |
473 | 64 ngx_str_t root; |
860
201d017ea470
slab allocator in shared memory
Igor Sysoev <igor@sysoev.ru>
parents:
611
diff
changeset
|
65 ngx_str_t lock_file; |
2011 | 66 ngx_str_t hostname; |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
67 }; |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
68 |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
69 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
70 typedef struct { |
473 | 71 ngx_flag_t daemon; |
72 ngx_flag_t master; | |
300
502b03d9d2a3
nginx-0.0.3-2004-03-31-00:31:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
290
diff
changeset
|
73 |
563 | 74 ngx_msec_t timer_resolution; |
75 | |
473 | 76 ngx_int_t worker_processes; |
77 ngx_int_t debug_points; | |
300
502b03d9d2a3
nginx-0.0.3-2004-03-31-00:31:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
290
diff
changeset
|
78 |
543 | 79 ngx_int_t rlimit_nofile; |
80 ngx_int_t rlimit_sigpending; | |
949
d1d8cde9aab9
worker_rlimit_core supports size in K, M, and G
Igor Sysoev <igor@sysoev.ru>
parents:
860
diff
changeset
|
81 size_t rlimit_core; |
543 | 82 |
473 | 83 int priority; |
300
502b03d9d2a3
nginx-0.0.3-2004-03-31-00:31:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
290
diff
changeset
|
84 |
577 | 85 ngx_uint_t cpu_affinity_n; |
86 u_long *cpu_affinity; | |
87 | |
473 | 88 char *username; |
89 ngx_uid_t user; | |
90 ngx_gid_t group; | |
91 | |
521 | 92 ngx_str_t working_directory; |
611 | 93 ngx_str_t lock_file; |
521 | 94 |
473 | 95 ngx_str_t pid; |
543 | 96 ngx_str_t oldpid; |
376
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
97 |
1069 | 98 ngx_array_t env; |
99 char **environment; | |
100 | |
376
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
101 #if (NGX_THREADS) |
473 | 102 ngx_int_t worker_threads; |
103 size_t thread_stack_size; | |
376
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
104 #endif |
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
105 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
106 } ngx_core_conf_t; |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
107 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
108 |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
109 typedef struct { |
473 | 110 ngx_pool_t *pool; /* pcre's malloc() pool */ |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
111 } ngx_core_tls_t; |
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
112 |
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
113 |
611 | 114 #define ngx_is_init_cycle(cycle) (cycle->conf_ctx == NULL) |
605 | 115 |
116 | |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
117 ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle); |
611 | 118 ngx_int_t ngx_create_pidfile(ngx_str_t *name, ngx_log_t *log); |
311
11ff50a35d6d
nginx-0.0.3-2004-04-12-20:38:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
300
diff
changeset
|
119 void ngx_delete_pidfile(ngx_cycle_t *cycle); |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
120 void ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user); |
1069 | 121 char **ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last); |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
122 ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv); |
577 | 123 u_long ngx_get_cpu_affinity(ngx_uint_t n); |
972 | 124 ngx_shm_zone_t *ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name, |
125 size_t size, void *tag); | |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
126 |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
127 |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
128 extern volatile ngx_cycle_t *ngx_cycle; |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
129 extern ngx_array_t ngx_old_cycles; |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
130 extern ngx_module_t ngx_core_module; |
318
56496082668b
nginx-0.0.3-2004-04-16-09:14:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
317
diff
changeset
|
131 extern ngx_uint_t ngx_test_config; |
381
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
132 #if (NGX_THREADS) |
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
133 extern ngx_tls_key_t ngx_core_tls_key; |
02a511569afb
nginx-0.0.7-2004-07-07-19:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
134 #endif |
218
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
135 |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
136 |
05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
137 #endif /* _NGX_CYCLE_H_INCLUDED_ */ |