comparison src/core/ngx_conf_file.h @ 6378:0f203a2af17c

Dynamic modules: moved module-related stuff to separate files.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 04 Feb 2016 18:30:21 +0300
parents 18428f775b2c
children 6d3a60a909c8
comparison
equal deleted inserted replaced
6377:11e019750adc 6378:0f203a2af17c
92 ngx_str_t name; 92 ngx_str_t name;
93 93
94 void (*flush)(ngx_open_file_t *file, ngx_log_t *log); 94 void (*flush)(ngx_open_file_t *file, ngx_log_t *log);
95 void *data; 95 void *data;
96 }; 96 };
97
98
99 #define NGX_MODULE_V1 0, 0, 0, 0, 0, 0, 1
100 #define NGX_MODULE_V1_PADDING 0, 0, 0, 0, 0, 0, 0, 0
101
102 struct ngx_module_s {
103 ngx_uint_t ctx_index;
104 ngx_uint_t index;
105
106 ngx_uint_t spare0;
107 ngx_uint_t spare1;
108 ngx_uint_t spare2;
109 ngx_uint_t spare3;
110
111 ngx_uint_t version;
112
113 void *ctx;
114 ngx_command_t *commands;
115 ngx_uint_t type;
116
117 ngx_int_t (*init_master)(ngx_log_t *log);
118
119 ngx_int_t (*init_module)(ngx_cycle_t *cycle);
120
121 ngx_int_t (*init_process)(ngx_cycle_t *cycle);
122 ngx_int_t (*init_thread)(ngx_cycle_t *cycle);
123 void (*exit_thread)(ngx_cycle_t *cycle);
124 void (*exit_process)(ngx_cycle_t *cycle);
125
126 void (*exit_master)(ngx_cycle_t *cycle);
127
128 uintptr_t spare_hook0;
129 uintptr_t spare_hook1;
130 uintptr_t spare_hook2;
131 uintptr_t spare_hook3;
132 uintptr_t spare_hook4;
133 uintptr_t spare_hook5;
134 uintptr_t spare_hook6;
135 uintptr_t spare_hook7;
136 };
137
138
139 typedef struct {
140 ngx_str_t name;
141 void *(*create_conf)(ngx_cycle_t *cycle);
142 char *(*init_conf)(ngx_cycle_t *cycle, void *conf);
143 } ngx_core_module_t;
144 97
145 98
146 typedef struct { 99 typedef struct {
147 ngx_file_t file; 100 ngx_file_t file;
148 ngx_buf_t *buffer; 101 ngx_buf_t *buffer;
338 char *ngx_conf_set_bufs_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 291 char *ngx_conf_set_bufs_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
339 char *ngx_conf_set_enum_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 292 char *ngx_conf_set_enum_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
340 char *ngx_conf_set_bitmask_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 293 char *ngx_conf_set_bitmask_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
341 294
342 295
343 extern ngx_uint_t ngx_max_module;
344 extern ngx_module_t *ngx_modules[];
345
346
347 #endif /* _NGX_CONF_FILE_H_INCLUDED_ */ 296 #endif /* _NGX_CONF_FILE_H_INCLUDED_ */