vendor/nginx/src/event/ngx_event.h in nginxtra-1.8.1.12 vs vendor/nginx/src/event/ngx_event.h in nginxtra-1.10.1.12
- old
+ new
@@ -32,11 +32,11 @@
unsigned write:1;
unsigned accept:1;
- /* used to detect the stale events in kqueue, rtsig, and epoll */
+ /* used to detect the stale events in kqueue and epoll */
unsigned instance:1;
/*
* the event was passed or would be passed to a kernel;
* in aio mode - operation was posted.
@@ -66,10 +66,18 @@
/* the pending eof reported by kqueue, epoll or in aio chain operation */
unsigned pending_eof:1;
unsigned posted:1;
+ unsigned closed:1;
+
+ /* to test on worker exit */
+ unsigned channel:1;
+ unsigned resolver:1;
+
+ unsigned cancelable:1;
+
#if (NGX_WIN32)
/* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was successful */
unsigned accept_context_updated:1;
#endif
@@ -101,38 +109,23 @@
#endif
ngx_event_handler_pt handler;
-#if (NGX_HAVE_AIO)
-
#if (NGX_HAVE_IOCP)
ngx_event_ovlp_t ovlp;
-#else
- struct aiocb aiocb;
#endif
-#endif
-
ngx_uint_t index;
ngx_log_t *log;
ngx_rbtree_node_t timer;
/* the posted queue */
ngx_queue_t queue;
- unsigned closed:1;
-
- /* to test on worker exit */
- unsigned channel:1;
- unsigned resolver:1;
-
- unsigned cancelable:1;
-
-
#if 0
/* the threads support */
/*
@@ -193,11 +186,11 @@
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_events)(ngx_cycle_t *cycle, ngx_msec_t timer,
- ngx_uint_t flags);
+ ngx_uint_t flags);
ngx_int_t (*init)(ngx_cycle_t *cycle, ngx_msec_t timer);
void (*done)(ngx_cycle_t *cycle);
} ngx_event_actions_t;
@@ -234,39 +227,37 @@
* kqueue in FreeBSD 4.1-4.2 has no NOTE_LOWAT so we need a separate flag.
*/
#define NGX_USE_LOWAT_EVENT 0x00000010
/*
- * The event filter requires to do i/o operation until EAGAIN: epoll, rtsig.
+ * The event filter requires to do i/o operation until EAGAIN: epoll.
*/
#define NGX_USE_GREEDY_EVENT 0x00000020
/*
* The event filter is epoll.
*/
#define NGX_USE_EPOLL_EVENT 0x00000040
/*
- * No need to add or delete the event filters: rtsig.
+ * Obsolete.
*/
#define NGX_USE_RTSIG_EVENT 0x00000080
/*
- * No need to add or delete the event filters: overlapped, aio_read,
- * aioread, io_submit.
+ * Obsolete.
*/
#define NGX_USE_AIO_EVENT 0x00000100
/*
* Need to add socket or handle only once: i/o completion port.
- * It also requires NGX_HAVE_AIO and NGX_USE_AIO_EVENT to be set.
*/
#define NGX_USE_IOCP_EVENT 0x00000200
/*
* The event filter has no opaque data and requires file descriptors table:
- * poll, /dev/poll, rtsig.
+ * poll, /dev/poll.
*/
#define NGX_USE_FD_EVENT 0x00000400
/*
* The event module handles periodic or absolute timer event by itself:
@@ -287,11 +278,11 @@
/*
* 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,
+ * kqueue, epoll, 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.
@@ -350,20 +341,21 @@
#undef NGX_DISABLE_EVENT
#define NGX_DISABLE_EVENT EV_DISABLE
-#elif (NGX_HAVE_DEVPOLL || NGX_HAVE_EVENTPORT)
+#elif (NGX_HAVE_DEVPOLL && !(NGX_TEST_BUILD_DEVPOLL)) \
+ || (NGX_HAVE_EVENTPORT && !(NGX_TEST_BUILD_EVENTPORT))
#define NGX_READ_EVENT POLLIN
#define NGX_WRITE_EVENT POLLOUT
#define NGX_LEVEL_EVENT 0
#define NGX_ONESHOT_EVENT 1
-#elif (NGX_HAVE_EPOLL)
+#elif (NGX_HAVE_EPOLL) && !(NGX_TEST_BUILD_EPOLL)
#define NGX_READ_EVENT (EPOLLIN|EPOLLRDHUP)
#define NGX_WRITE_EVENT EPOLLOUT
#define NGX_LEVEL_EVENT 0
@@ -425,10 +417,11 @@
#define ngx_recv ngx_io.recv
#define ngx_recv_chain ngx_io.recv_chain
#define ngx_udp_recv ngx_io.udp_recv
#define ngx_send ngx_io.send
#define ngx_send_chain ngx_io.send_chain
+#define ngx_udp_send ngx_io.udp_send
#define NGX_EVENT_MODULE 0x544E5645 /* "EVNT" */
#define NGX_EVENT_CONF 0x02000000
@@ -498,9 +491,12 @@
(*(ngx_get_conf(conf_ctx, ngx_events_module))) [module.ctx_index];
void ngx_event_accept(ngx_event_t *ev);
+#if !(NGX_WIN32)
+void ngx_event_recvmsg(ngx_event_t *ev);
+#endif
ngx_int_t ngx_trylock_accept_mutex(ngx_cycle_t *cycle);
u_char *ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len);
void ngx_process_events_and_timers(ngx_cycle_t *cycle);