summaryrefslogtreecommitdiffhomepage
path: root/src/event/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/modules')
-rw-r--r--src/event/modules/ngx_aio_module.c5
-rw-r--r--src/event/modules/ngx_devpoll_module.c13
-rw-r--r--src/event/modules/ngx_kqueue_module.c9
-rw-r--r--src/event/modules/ngx_kqueue_module.h5
-rw-r--r--src/event/modules/ngx_poll_module.c7
-rw-r--r--src/event/modules/ngx_select_module.c9
6 files changed, 22 insertions, 26 deletions
diff --git a/src/event/modules/ngx_aio_module.c b/src/event/modules/ngx_aio_module.c
index afb343ef2..cc48926de 100644
--- a/src/event/modules/ngx_aio_module.c
+++ b/src/event/modules/ngx_aio_module.c
@@ -29,7 +29,6 @@ ngx_os_io_t ngx_os_aio = {
static ngx_str_t aio_name = ngx_string("aio");
ngx_event_module_t ngx_aio_module_ctx = {
- NGX_EVENT_MODULE,
&aio_name,
NULL, /* create configuration */
NULL, /* init configuration */
@@ -49,10 +48,10 @@ ngx_event_module_t ngx_aio_module_ctx = {
};
ngx_module_t ngx_aio_module = {
+ NGX_MODULE,
&ngx_aio_module_ctx, /* module context */
- 0, /* module index */
NULL, /* module directives */
- NGX_EVENT_MODULE_TYPE, /* module type */
+ NGX_EVENT_MODULE, /* module type */
NULL /* init module */
};
diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c
index 531e96a24..27396fcde 100644
--- a/src/event/modules/ngx_devpoll_module.c
+++ b/src/event/modules/ngx_devpoll_module.c
@@ -72,12 +72,11 @@ static ngx_command_t ngx_devpoll_commands[] = {
offsetof(ngx_devpoll_conf_t, events),
NULL},
- {ngx_string(""), 0, NULL, 0, 0, NULL}
+ ngx_null_command
};
ngx_event_module_t ngx_devpoll_module_ctx = {
- NGX_EVENT_MODULE,
&devpoll_name,
ngx_devpoll_create_conf, /* create configuration */
ngx_devpoll_init_conf, /* init configuration */
@@ -97,10 +96,10 @@ ngx_event_module_t ngx_devpoll_module_ctx = {
};
ngx_module_t ngx_devpoll_module = {
+ NGX_MODULE,
&ngx_devpoll_module_ctx, /* module context */
- 0, /* module index */
ngx_devpoll_commands, /* module directives */
- NGX_EVENT_MODULE_TYPE, /* module type */
+ NGX_EVENT_MODULE, /* module type */
NULL /* init module */
};
@@ -109,7 +108,7 @@ static int ngx_devpoll_init(ngx_log_t *log)
{
ngx_devpoll_conf_t *dpcf;
- dpcf = ngx_event_get_conf(ngx_devpoll_module_ctx);
+ dpcf = ngx_event_get_conf(ngx_devpoll_module);
ngx_log_debug(log, "CH: %d" _ dpcf->changes);
ngx_log_debug(log, "EV: %d" _ dpcf->events);
@@ -194,7 +193,7 @@ static int ngx_devpoll_del_event(ngx_event_t *ev, int event, u_int flags)
ngx_event_t *e;
#if (NGX_DEBUG_EVENT)
- ngx_connection_t *c = (ngx_connection_t *) ev->data;
+ ngx_connection_t *c = ev->data;
ngx_log_debug(c->log, "del event: %d, %d" _ c->fd _ event);
#endif
@@ -229,7 +228,7 @@ static int ngx_devpoll_del_event(ngx_event_t *ev, int event, u_int flags)
static int ngx_devpoll_set_event(ngx_event_t *ev, int event, u_int flags)
{
- int n;
+ int n;
ngx_connection_t *c;
c = ev->data;
diff --git a/src/event/modules/ngx_kqueue_module.c b/src/event/modules/ngx_kqueue_module.c
index 7a38d0a5e..f1688bbd2 100644
--- a/src/event/modules/ngx_kqueue_module.c
+++ b/src/event/modules/ngx_kqueue_module.c
@@ -47,12 +47,11 @@ static ngx_command_t ngx_kqueue_commands[] = {
offsetof(ngx_kqueue_conf_t, events),
NULL},
- {ngx_string(""), 0, NULL, 0, 0, NULL}
+ ngx_null_command
};
ngx_event_module_t ngx_kqueue_module_ctx = {
- NGX_EVENT_MODULE,
&kqueue_name,
ngx_kqueue_create_conf, /* create configuration */
ngx_kqueue_init_conf, /* init configuration */
@@ -72,10 +71,10 @@ ngx_event_module_t ngx_kqueue_module_ctx = {
};
ngx_module_t ngx_kqueue_module = {
+ NGX_MODULE,
&ngx_kqueue_module_ctx, /* module context */
- 0, /* module index */
ngx_kqueue_commands, /* module directives */
- NGX_EVENT_MODULE_TYPE, /* module type */
+ NGX_EVENT_MODULE, /* module type */
NULL /* init module */
};
@@ -84,7 +83,7 @@ static int ngx_kqueue_init(ngx_log_t *log)
{
ngx_kqueue_conf_t *kcf;
- kcf = ngx_event_get_conf(ngx_kqueue_module_ctx);
+ kcf = ngx_event_get_conf(ngx_kqueue_module);
ngx_log_debug(log, "CH: %d" _ kcf->changes);
ngx_log_debug(log, "EV: %d" _ kcf->events);
diff --git a/src/event/modules/ngx_kqueue_module.h b/src/event/modules/ngx_kqueue_module.h
index 72b85d235..2f1757f73 100644
--- a/src/event/modules/ngx_kqueue_module.h
+++ b/src/event/modules/ngx_kqueue_module.h
@@ -8,8 +8,9 @@ typedef struct {
} ngx_kqueue_conf_t;
-extern int ngx_kqueue;
-/* STUB */ extern ngx_event_module_t ngx_kqueue_module_ctx;
+extern int ngx_kqueue;
+extern ngx_module_t ngx_kqueue_module;
+extern ngx_event_module_t ngx_kqueue_module_ctx;
diff --git a/src/event/modules/ngx_poll_module.c b/src/event/modules/ngx_poll_module.c
index 5ca6e939e..adb147d81 100644
--- a/src/event/modules/ngx_poll_module.c
+++ b/src/event/modules/ngx_poll_module.c
@@ -27,7 +27,6 @@ static ngx_event_t **ready_index;
static ngx_str_t poll_name = ngx_string("poll");
ngx_event_module_t ngx_poll_module_ctx = {
- NGX_EVENT_MODULE,
&poll_name,
NULL, /* create configuration */
NULL, /* init configuration */
@@ -47,10 +46,10 @@ ngx_event_module_t ngx_poll_module_ctx = {
};
ngx_module_t ngx_poll_module = {
+ NGX_MODULE,
&ngx_poll_module_ctx, /* module context */
- 0, /* module index */
NULL, /* module directives */
- NGX_EVENT_MODULE_TYPE, /* module type */
+ NGX_EVENT_MODULE, /* module type */
NULL /* init module */
};
@@ -60,7 +59,7 @@ static int ngx_poll_init(ngx_log_t *log)
{
ngx_event_conf_t *ecf;
- ecf = ngx_event_get_conf(ngx_event_module_ctx);
+ ecf = ngx_event_get_conf(ngx_event_module);
ngx_test_null(event_list,
ngx_alloc(sizeof(struct pollfd) * ecf->connections, log),
diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c
index b1f2c9d46..4b8391c9c 100644
--- a/src/event/modules/ngx_select_module.c
+++ b/src/event/modules/ngx_select_module.c
@@ -40,7 +40,6 @@ static ngx_event_t **ready_index;
static ngx_str_t select_name = ngx_string("select");
ngx_event_module_t ngx_select_module_ctx = {
- NGX_EVENT_MODULE,
&select_name,
NULL, /* create configuration */
ngx_select_init_conf, /* init configuration */
@@ -60,10 +59,10 @@ ngx_event_module_t ngx_select_module_ctx = {
};
ngx_module_t ngx_select_module = {
+ NGX_MODULE,
&ngx_select_module_ctx, /* module context */
- 0, /* module index */
NULL, /* module directives */
- NGX_EVENT_MODULE_TYPE, /* module type */
+ NGX_EVENT_MODULE, /* module type */
NULL /* init module */
};
@@ -72,7 +71,7 @@ static int ngx_select_init(ngx_log_t *log)
{
ngx_event_conf_t *ecf;
- ecf = ngx_event_get_conf(ngx_event_module_ctx);
+ ecf = ngx_event_get_conf(ngx_event_module);
FD_ZERO(&master_read_fd_set);
FD_ZERO(&master_write_fd_set);
@@ -378,7 +377,7 @@ static char *ngx_select_init_conf(ngx_pool_t *pool, void *conf)
{
ngx_event_conf_t *ecf;
- ecf = ngx_event_get_conf(ngx_event_module_ctx);
+ ecf = ngx_event_get_conf(ngx_event_module);
if (ecf->connections > FD_SETSIZE) {
return "maximum number of connections "