diff options
| author | Valentin Bartenev <vbart@nginx.com> | 2015-03-14 17:37:07 +0300 |
|---|---|---|
| committer | Valentin Bartenev <vbart@nginx.com> | 2015-03-14 17:37:07 +0300 |
| commit | 305fc021db799c87d751f0f1f5e99afee7bb2b3b (patch) | |
| tree | 8c3cf7a86f08ede19803a9f9beecb33cc0d9ebb3 /src/event | |
| parent | 08e05a40422300a25e3b4e5b915592d7b2c41592 (diff) | |
| download | nginx-305fc021db799c87d751f0f1f5e99afee7bb2b3b.tar.gz nginx-305fc021db799c87d751f0f1f5e99afee7bb2b3b.tar.bz2 | |
Thread pools implementation.
Diffstat (limited to 'src/event')
| -rw-r--r-- | src/event/modules/ngx_aio_module.c | 1 | ||||
| -rw-r--r-- | src/event/modules/ngx_devpoll_module.c | 1 | ||||
| -rw-r--r-- | src/event/modules/ngx_epoll_module.c | 1 | ||||
| -rw-r--r-- | src/event/modules/ngx_eventport_module.c | 1 | ||||
| -rw-r--r-- | src/event/modules/ngx_iocp_module.c | 1 | ||||
| -rw-r--r-- | src/event/modules/ngx_kqueue_module.c | 1 | ||||
| -rw-r--r-- | src/event/modules/ngx_poll_module.c | 1 | ||||
| -rw-r--r-- | src/event/modules/ngx_rtsig_module.c | 1 | ||||
| -rw-r--r-- | src/event/modules/ngx_select_module.c | 1 | ||||
| -rw-r--r-- | src/event/modules/ngx_win32_select_module.c | 1 | ||||
| -rw-r--r-- | src/event/ngx_event.c | 2 | ||||
| -rw-r--r-- | src/event/ngx_event.h | 4 |
12 files changed, 15 insertions, 1 deletions
diff --git a/src/event/modules/ngx_aio_module.c b/src/event/modules/ngx_aio_module.c index c881319d1..5df58d24c 100644 --- a/src/event/modules/ngx_aio_module.c +++ b/src/event/modules/ngx_aio_module.c @@ -48,6 +48,7 @@ ngx_event_module_t ngx_aio_module_ctx = { NULL, /* disable an event */ NULL, /* add an connection */ ngx_aio_del_connection, /* delete an connection */ + NULL, /* trigger a notify */ NULL, /* process the changes */ ngx_aio_process_events, /* process the events */ ngx_aio_init, /* init the events */ diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c index 5658e8620..f651c9a56 100644 --- a/src/event/modules/ngx_devpoll_module.c +++ b/src/event/modules/ngx_devpoll_module.c @@ -88,6 +88,7 @@ ngx_event_module_t ngx_devpoll_module_ctx = { ngx_devpoll_del_event, /* disable an event */ NULL, /* add an connection */ NULL, /* delete an connection */ + NULL, /* trigger a notify */ NULL, /* process the changes */ ngx_devpoll_process_events, /* process the events */ ngx_devpoll_init, /* init the events */ diff --git a/src/event/modules/ngx_epoll_module.c b/src/event/modules/ngx_epoll_module.c index 2674d382b..2de265a04 100644 --- a/src/event/modules/ngx_epoll_module.c +++ b/src/event/modules/ngx_epoll_module.c @@ -164,6 +164,7 @@ ngx_event_module_t ngx_epoll_module_ctx = { ngx_epoll_del_event, /* disable an event */ ngx_epoll_add_connection, /* add an connection */ ngx_epoll_del_connection, /* delete an connection */ + NULL, /* trigger a notify */ NULL, /* process the changes */ ngx_epoll_process_events, /* process the events */ ngx_epoll_init, /* init the events */ diff --git a/src/event/modules/ngx_eventport_module.c b/src/event/modules/ngx_eventport_module.c index b23f3b279..c86c70e0f 100644 --- a/src/event/modules/ngx_eventport_module.c +++ b/src/event/modules/ngx_eventport_module.c @@ -172,6 +172,7 @@ ngx_event_module_t ngx_eventport_module_ctx = { ngx_eventport_del_event, /* disable an event */ NULL, /* add an connection */ NULL, /* delete an connection */ + NULL, /* trigger a notify */ NULL, /* process the changes */ ngx_eventport_process_events, /* process the events */ ngx_eventport_init, /* init the events */ diff --git a/src/event/modules/ngx_iocp_module.c b/src/event/modules/ngx_iocp_module.c index 75c5a517b..2ddf6ea71 100644 --- a/src/event/modules/ngx_iocp_module.c +++ b/src/event/modules/ngx_iocp_module.c @@ -64,6 +64,7 @@ ngx_event_module_t ngx_iocp_module_ctx = { NULL, /* disable an event */ NULL, /* add an connection */ ngx_iocp_del_connection, /* delete an connection */ + NULL, /* trigger a notify */ NULL, /* process the changes */ ngx_iocp_process_events, /* process the events */ ngx_iocp_init, /* init the events */ diff --git a/src/event/modules/ngx_kqueue_module.c b/src/event/modules/ngx_kqueue_module.c index 17214c5fb..ddcbbadc3 100644 --- a/src/event/modules/ngx_kqueue_module.c +++ b/src/event/modules/ngx_kqueue_module.c @@ -89,6 +89,7 @@ ngx_event_module_t ngx_kqueue_module_ctx = { ngx_kqueue_del_event, /* disable an event */ NULL, /* add an connection */ NULL, /* delete an connection */ + NULL, /* trigger a notify */ ngx_kqueue_process_changes, /* process the changes */ ngx_kqueue_process_events, /* process the events */ ngx_kqueue_init, /* init the events */ diff --git a/src/event/modules/ngx_poll_module.c b/src/event/modules/ngx_poll_module.c index 3617afb95..b96c90874 100644 --- a/src/event/modules/ngx_poll_module.c +++ b/src/event/modules/ngx_poll_module.c @@ -39,6 +39,7 @@ ngx_event_module_t ngx_poll_module_ctx = { ngx_poll_del_event, /* disable an event */ NULL, /* add an connection */ NULL, /* delete an connection */ + NULL, /* trigger a notify */ NULL, /* process the changes */ ngx_poll_process_events, /* process the events */ ngx_poll_init, /* init the events */ diff --git a/src/event/modules/ngx_rtsig_module.c b/src/event/modules/ngx_rtsig_module.c index 9e31afa1c..3777516b4 100644 --- a/src/event/modules/ngx_rtsig_module.c +++ b/src/event/modules/ngx_rtsig_module.c @@ -130,6 +130,7 @@ ngx_event_module_t ngx_rtsig_module_ctx = { NULL, /* disable an event */ ngx_rtsig_add_connection, /* add an connection */ ngx_rtsig_del_connection, /* delete an connection */ + NULL, /* trigger a notify */ NULL, /* process the changes */ ngx_rtsig_process_events, /* process the events */ ngx_rtsig_init, /* init the events */ diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c index e83744431..a8bf06676 100644 --- a/src/event/modules/ngx_select_module.c +++ b/src/event/modules/ngx_select_module.c @@ -47,6 +47,7 @@ ngx_event_module_t ngx_select_module_ctx = { ngx_select_del_event, /* disable an event */ NULL, /* add an connection */ NULL, /* delete an connection */ + NULL, /* trigger a notify */ NULL, /* process the changes */ ngx_select_process_events, /* process the events */ ngx_select_init, /* init the events */ diff --git a/src/event/modules/ngx_win32_select_module.c b/src/event/modules/ngx_win32_select_module.c index be87ded24..58b20db1e 100644 --- a/src/event/modules/ngx_win32_select_module.c +++ b/src/event/modules/ngx_win32_select_module.c @@ -48,6 +48,7 @@ ngx_event_module_t ngx_select_module_ctx = { ngx_select_del_event, /* disable an event */ NULL, /* add an connection */ NULL, /* delete an connection */ + NULL, /* trigger a notify */ NULL, /* process the changes */ ngx_select_process_events, /* process the events */ ngx_select_init, /* init the events */ diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c index 885528aae..2a23d5038 100644 --- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -178,7 +178,7 @@ ngx_event_module_t ngx_event_core_module_ctx = { ngx_event_core_create_conf, /* create configuration */ ngx_event_core_init_conf, /* init configuration */ - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } + { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } }; diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h index b403204f2..61ebcb089 100644 --- a/src/event/ngx_event.h +++ b/src/event/ngx_event.h @@ -200,6 +200,8 @@ typedef struct { ngx_int_t (*add_conn)(ngx_connection_t *c); ngx_int_t (*del_conn)(ngx_connection_t *c, ngx_uint_t flags); + ngx_int_t (*notify)(ngx_event_handler_pt handler); + ngx_int_t (*process_changes)(ngx_cycle_t *cycle, ngx_uint_t nowait); ngx_int_t (*process_events)(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags); @@ -422,6 +424,8 @@ extern ngx_event_actions_t ngx_event_actions; #define ngx_add_conn ngx_event_actions.add_conn #define ngx_del_conn ngx_event_actions.del_conn +#define ngx_notify ngx_event_actions.notify + #define ngx_add_timer ngx_event_add_timer #define ngx_del_timer ngx_event_del_timer |
