Mercurial > hg > nginx-vendor-current
diff src/event/ngx_event.h @ 332:3a91bfeffaba NGINX_0_6_10
nginx 0.6.10
*) Feature: the "open_file_cache", "open_file_cache_retest", and
"open_file_cache_errors" directives.
*) Bugfix: socket leak; bug appeared in 0.6.7.
*) Bugfix: a charset set by the "charset" directive was not appended to
the "Content-Type" header set by $r->send_http_header().
*) Bugfix: a segmentation fault might occur in worker process if
/dev/poll method was used.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 03 Sep 2007 00:00:00 +0400 |
parents | f7cd062ee035 |
children | 583decdb82a4 |
line wrap: on
line diff
--- a/src/event/ngx_event.h +++ b/src/event/ngx_event.h @@ -41,7 +41,7 @@ struct ngx_event_s { unsigned accept:1; - /* used to detect the stale events in kqueue, rt signals and epoll */ + /* used to detect the stale events in kqueue, rtsig, and epoll */ unsigned instance:1; /* @@ -247,8 +247,7 @@ extern ngx_event_actions_t ngx_event_a #define NGX_USE_LOWAT_EVENT 0x00000010 /* - * The event filter requires to do i/o operation until EAGAIN: - * epoll, rt signals. + * The event filter requires to do i/o operation until EAGAIN: epoll, rtsig. */ #define NGX_USE_GREEDY_EVENT 0x00000020 @@ -258,7 +257,7 @@ extern ngx_event_actions_t ngx_event_a #define NGX_USE_EPOLL_EVENT 0x00000040 /* - * No need to add or delete the event filters: rt signals. + * No need to add or delete the event filters: rtsig. */ #define NGX_USE_RTSIG_EVENT 0x00000080 @@ -276,13 +275,13 @@ extern ngx_event_actions_t ngx_event_a /* * The event filter has no opaque data and requires file descriptors table: - * poll, /dev/poll, rt signals. + * poll, /dev/poll, rtsig. */ #define NGX_USE_FD_EVENT 0x00000400 /* * The event module handles periodic or absolute timer event by itself: - * kqueue in FreeBSD 4.4 and NetBSD 2.0, Solaris 10's event ports. + * kqueue in FreeBSD 4.4, NetBSD 2.0, and MacOSX 10.4, Solaris 10's event ports. */ #define NGX_USE_TIMER_EVENT 0x00000800 @@ -290,19 +289,37 @@ extern ngx_event_actions_t ngx_event_a * All event filters on file descriptor are deleted after a notification: * Solaris 10's event ports. */ -#define NGX_USE_EVENTPORT_EVENT 0x00001000 +#define NGX_USE_EVENTPORT_EVENT 0x00001000 +/* + * The event filter support vnode notifications: kqueue. + */ +#define NGX_USE_VNODE_EVENT 0x00002000 /* - * The event filter is deleted before the closing file. - * Has no meaning for select, poll, kqueue, epoll. - * /dev/poll: we need to flush POLLREMOVE event before closing file + * The event filter is deleted just before the closing file. + * Has no meaning for select and poll. + * kqueue, epoll, rtsig, eventport: allows to avoid explicit delete, + * because filter automatically is deleted + * on file close, + * + * /dev/poll: we need to flush POLLREMOVE event + * before closing file. */ +#define NGX_CLOSE_EVENT 1 -#define NGX_CLOSE_EVENT 1 +/* + * disable temporarily event filter, this may avoid locks + * in kernel malloc()/free(): kqueue. + */ #define NGX_DISABLE_EVENT 2 +/* + * event must be passed to kernel right now, do not wait until batch processing. + */ +#define NGX_FLUSH_EVENT 4 + /* these flags have a meaning only for kqueue */ #define NGX_LOWAT_EVENT 0 @@ -318,11 +335,11 @@ extern ngx_event_actions_t ngx_event_a #define NGX_VNODE_EVENT EVFILT_VNODE /* - * NGX_CLOSE_EVENT and NGX_LOWAT_EVENT are the module flags and they would - * not go into a kernel so we need to choose the value that would not interfere - * with any existent and future kqueue flags. kqueue has such values - - * EV_FLAG1, EV_EOF and EV_ERROR. They are reserved and cleared on a kernel - * entrance. + * NGX_CLOSE_EVENT, NGX_LOWAT_EVENT, and NGX_FLUSH_EVENT are the module flags + * and they must not go into a kernel so we need to choose the value + * that must not interfere with any existent and future kqueue flags. + * kqueue has such values - EV_FLAG1, EV_EOF, and EV_ERROR: + * they are reserved and cleared on a kernel entrance. */ #undef NGX_CLOSE_EVENT #define NGX_CLOSE_EVENT EV_EOF @@ -330,6 +347,9 @@ extern ngx_event_actions_t ngx_event_a #undef NGX_LOWAT_EVENT #define NGX_LOWAT_EVENT EV_FLAG1 +#undef NGX_FLUSH_EVENT +#define NGX_FLUSH_EVENT EV_ERROR + #define NGX_LEVEL_EVENT 0 #define NGX_ONESHOT_EVENT EV_ONESHOT #define NGX_CLEAR_EVENT EV_CLEAR