这个应该是要分析的第一个模块吧,首先看该模块的定义(src/core/nginx.c):
static ngx_core_module_t ngx_core_module_ctx = {
ngx_string("core"),
ngx_core_module_create_conf, //创建配置的函数
ngx_core_module_init_conf //初始化配置的函数
};
ngx_module_t ngx_core_module = {
NGX_MODULE_V1,
&ngx_core_module_ctx, /* module context */ //模块的上下文
ngx_core_commands, /* module directives */ //模块的一些命令
NGX_CORE_MODULE, /* module type */
NULL, /* init master */
NULL, /* init module */
NULL, /* init process */
NULL, /* init thread */
NULL, /* exit thread */
NULL, /* exit process */
NULL,