diff options
Diffstat (limited to 'src/event/modules')
-rw-r--r-- | src/event/modules/ngx_aio_module.c | 2 | ||||
-rw-r--r-- | src/event/modules/ngx_devpoll_module.c | 2 | ||||
-rw-r--r-- | src/event/modules/ngx_iocp_module.c | 2 | ||||
-rw-r--r-- | src/event/modules/ngx_kqueue_module.c | 21 | ||||
-rw-r--r-- | src/event/modules/ngx_poll_module.c | 5 | ||||
-rw-r--r-- | src/event/modules/ngx_select_module.c | 5 |
6 files changed, 18 insertions, 19 deletions
diff --git a/src/event/modules/ngx_aio_module.c b/src/event/modules/ngx_aio_module.c index cdfb1b01f..4b89c2a54 100644 --- a/src/event/modules/ngx_aio_module.c +++ b/src/event/modules/ngx_aio_module.c @@ -68,7 +68,7 @@ static int ngx_aio_init(ngx_cycle_t *cycle) ngx_io = ngx_os_aio; - ngx_event_flags = NGX_HAVE_AIO_EVENT|NGX_USE_AIO_EVENT; + ngx_event_flags = NGX_USE_AIO_EVENT; ngx_event_actions = ngx_aio_module_ctx.actions; diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c index e55f17c9d..c21abde0d 100644 --- a/src/event/modules/ngx_devpoll_module.c +++ b/src/event/modules/ngx_devpoll_module.c @@ -173,7 +173,7 @@ ngx_log_debug(cycle->log, "EV: %d" _ dpcf->events); ngx_event_actions = ngx_devpoll_module_ctx.actions; - ngx_event_flags = NGX_HAVE_LEVEL_EVENT|NGX_USE_LEVEL_EVENT; + ngx_event_flags = NGX_USE_LEVEL_EVENT; return NGX_OK; } diff --git a/src/event/modules/ngx_iocp_module.c b/src/event/modules/ngx_iocp_module.c index 2f31eb6fb..86d763b71 100644 --- a/src/event/modules/ngx_iocp_module.c +++ b/src/event/modules/ngx_iocp_module.c @@ -105,7 +105,7 @@ static int ngx_iocp_init(ngx_cycle_t *cycle) ngx_event_actions = ngx_iocp_module_ctx.actions; - ngx_event_flags = NGX_HAVE_AIO_EVENT|NGX_HAVE_IOCP_EVENT; + ngx_event_flags = NGX_USE_AIO_EVENT|NGX_USE_IOCP_EVENT; return NGX_OK; } diff --git a/src/event/modules/ngx_kqueue_module.c b/src/event/modules/ngx_kqueue_module.c index d0a9d2e48..14eb27038 100644 --- a/src/event/modules/ngx_kqueue_module.c +++ b/src/event/modules/ngx_kqueue_module.c @@ -151,10 +151,9 @@ ngx_log_debug(cycle->log, "EV: %d" _ kcf->events); ngx_event_actions = ngx_kqueue_module_ctx.actions; - ngx_event_flags = NGX_HAVE_LEVEL_EVENT - |NGX_HAVE_ONESHOT_EVENT + ngx_event_flags = NGX_USE_ONESHOT_EVENT #if (HAVE_CLEAR_EVENT) - |NGX_HAVE_CLEAR_EVENT + |NGX_USE_CLEAR_EVENT #else |NGX_USE_LEVEL_EVENT #endif @@ -238,9 +237,11 @@ static int ngx_kqueue_del_event(ngx_event_t *ev, int event, u_int flags) return NGX_OK; } - /* when the file descriptor is closed a kqueue automatically deletes - its filters so we do not need to delete explicity the event - before the closing the file descriptor */ + /* + * when the file descriptor is closed a kqueue automatically deletes + * its filters so we do not need to delete explicity the event + * before the closing the file descriptor. + */ if (flags & NGX_CLOSE_EVENT) { return NGX_OK; @@ -427,13 +428,17 @@ static int ngx_kqueue_process_events(ngx_log_t *log) if (ev->oneshot && ev->timer_set) { ngx_del_timer(ev); - ev->timer_set = 0; } - /* fall through */ + ev->ready = 1; + + ev->event_handler(ev); + + break; case EVFILT_AIO: ev->ready = 1; + ev->active = 0; ev->event_handler(ev); diff --git a/src/event/modules/ngx_poll_module.c b/src/event/modules/ngx_poll_module.c index 4d50b4a52..9d2f8aca3 100644 --- a/src/event/modules/ngx_poll_module.c +++ b/src/event/modules/ngx_poll_module.c @@ -109,9 +109,7 @@ static int ngx_poll_init(ngx_cycle_t *cycle) ngx_event_actions = ngx_poll_module_ctx.actions; - ngx_event_flags = NGX_HAVE_LEVEL_EVENT - |NGX_HAVE_ONESHOT_EVENT - |NGX_USE_LEVEL_EVENT; + ngx_event_flags = NGX_USE_LEVEL_EVENT|NGX_USE_ONESHOT_EVENT; return NGX_OK; } @@ -364,7 +362,6 @@ static int ngx_poll_process_events(ngx_log_t *log) if (ev->oneshot) { if (ev->timer_set) { ngx_del_timer(ev); - ev->timer_set = 0; } if (ev->write) { diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c index 1f8a5d98e..792476669 100644 --- a/src/event/modules/ngx_select_module.c +++ b/src/event/modules/ngx_select_module.c @@ -108,9 +108,7 @@ static int ngx_select_init(ngx_cycle_t *cycle) ngx_event_actions = ngx_select_module_ctx.actions; - ngx_event_flags = NGX_HAVE_LEVEL_EVENT - |NGX_HAVE_ONESHOT_EVENT - |NGX_USE_LEVEL_EVENT; + ngx_event_flags = NGX_USE_LEVEL_EVENT|NGX_USE_ONESHOT_EVENT; #if (WIN32) max_read = max_write = 0; @@ -401,7 +399,6 @@ static int ngx_select_process_events(ngx_log_t *log) if (ev->oneshot) { if (ev->timer_set) { ngx_del_timer(ev); - ev->timer_set = 0; } if (ev->write) { |