#ifndef _NGX_EVENT_H_INCLUDED_
#define _NGX_EVENT_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#define NGX_INVALID_INDEX …
#if (NGX_HAVE_IOCP)
typedef struct {
WSAOVERLAPPED ovlp;
ngx_event_t *event;
int error;
} ngx_event_ovlp_t;
#endif
struct ngx_event_s { … };
#if (NGX_HAVE_FILE_AIO)
struct ngx_event_aio_s {
void *data;
ngx_event_handler_pt handler;
ngx_file_t *file;
ngx_fd_t fd;
#if (NGX_HAVE_EVENTFD)
int64_t res;
#endif
#if !(NGX_HAVE_EVENTFD) || (NGX_TEST_BUILD_EPOLL)
ngx_err_t err;
size_t nbytes;
#endif
ngx_aiocb_t aiocb;
ngx_event_t event;
};
#endif
ngx_event_actions_t;
extern ngx_event_actions_t ngx_event_actions;
#if (NGX_HAVE_EPOLLRDHUP)
extern ngx_uint_t ngx_use_epoll_rdhup;
#endif
#define NGX_USE_LEVEL_EVENT …
#define NGX_USE_ONESHOT_EVENT …
#define NGX_USE_CLEAR_EVENT …
#define NGX_USE_KQUEUE_EVENT …
#define NGX_USE_LOWAT_EVENT …
#define NGX_USE_GREEDY_EVENT …
#define NGX_USE_EPOLL_EVENT …
#define NGX_USE_RTSIG_EVENT …
#define NGX_USE_AIO_EVENT …
#define NGX_USE_IOCP_EVENT …
#define NGX_USE_FD_EVENT …
#define NGX_USE_TIMER_EVENT …
#define NGX_USE_EVENTPORT_EVENT …
#define NGX_USE_VNODE_EVENT …
#define NGX_CLOSE_EVENT …
#define NGX_DISABLE_EVENT …
#define NGX_FLUSH_EVENT …
#define NGX_LOWAT_EVENT …
#define NGX_VNODE_EVENT …
#if (NGX_HAVE_EPOLL) && !(NGX_HAVE_EPOLLRDHUP)
#define EPOLLRDHUP …
#endif
#if (NGX_HAVE_KQUEUE)
#define NGX_READ_EVENT …
#define NGX_WRITE_EVENT …
#undef NGX_VNODE_EVENT
#define NGX_VNODE_EVENT …
#undef NGX_CLOSE_EVENT
#define NGX_CLOSE_EVENT …
#undef NGX_LOWAT_EVENT
#define NGX_LOWAT_EVENT …
#undef NGX_FLUSH_EVENT
#define NGX_FLUSH_EVENT …
#define NGX_LEVEL_EVENT …
#define NGX_ONESHOT_EVENT …
#define NGX_CLEAR_EVENT …
#undef NGX_DISABLE_EVENT
#define NGX_DISABLE_EVENT …
#elif (NGX_HAVE_DEVPOLL && !(NGX_TEST_BUILD_DEVPOLL)) \
|| (NGX_HAVE_EVENTPORT && !(NGX_TEST_BUILD_EVENTPORT))
#define NGX_READ_EVENT …
#define NGX_WRITE_EVENT …
#define NGX_LEVEL_EVENT …
#define NGX_ONESHOT_EVENT …
#elif (NGX_HAVE_EPOLL) && !(NGX_TEST_BUILD_EPOLL)
#define NGX_READ_EVENT …
#define NGX_WRITE_EVENT …
#define NGX_LEVEL_EVENT …
#define NGX_CLEAR_EVENT …
#define NGX_ONESHOT_EVENT …
#if 0
#define NGX_ONESHOT_EVENT …
#endif
#if (NGX_HAVE_EPOLLEXCLUSIVE)
#define NGX_EXCLUSIVE_EVENT …
#endif
#elif (NGX_HAVE_POLL)
#define NGX_READ_EVENT …
#define NGX_WRITE_EVENT …
#define NGX_LEVEL_EVENT …
#define NGX_ONESHOT_EVENT …
#else
#define NGX_READ_EVENT …
#define NGX_WRITE_EVENT …
#define NGX_LEVEL_EVENT …
#define NGX_ONESHOT_EVENT …
#endif
#if (NGX_HAVE_IOCP)
#define NGX_IOCP_ACCEPT …
#define NGX_IOCP_IO …
#define NGX_IOCP_CONNECT …
#endif
#if (NGX_TEST_BUILD_EPOLL)
#define NGX_EXCLUSIVE_EVENT …
#endif
#ifndef NGX_CLEAR_EVENT
#define NGX_CLEAR_EVENT …
#endif
#define ngx_process_events …
#define ngx_done_events …
#define ngx_add_event …
#define ngx_del_event …
#define ngx_add_conn …
#define ngx_del_conn …
#define ngx_notify …
#define ngx_add_timer …
#define ngx_del_timer …
extern ngx_os_io_t ngx_io;
#define ngx_recv …
#define ngx_recv_chain …
#define ngx_udp_recv …
#define ngx_send …
#define ngx_send_chain …
#define ngx_udp_send …
#define ngx_udp_send_chain …
#define NGX_EVENT_MODULE …
#define NGX_EVENT_CONF …
ngx_event_conf_t;
ngx_event_module_t;
extern ngx_atomic_t *ngx_connection_counter;
extern ngx_atomic_t *ngx_accept_mutex_ptr;
extern ngx_shmtx_t ngx_accept_mutex;
extern ngx_uint_t ngx_use_accept_mutex;
extern ngx_uint_t ngx_accept_events;
extern ngx_uint_t ngx_accept_mutex_held;
extern ngx_msec_t ngx_accept_mutex_delay;
extern ngx_int_t ngx_accept_disabled;
extern ngx_uint_t ngx_use_exclusive_accept;
#if (NGX_STAT_STUB)
extern ngx_atomic_t *ngx_stat_accepted;
extern ngx_atomic_t *ngx_stat_handled;
extern ngx_atomic_t *ngx_stat_requests;
extern ngx_atomic_t *ngx_stat_active;
extern ngx_atomic_t *ngx_stat_reading;
extern ngx_atomic_t *ngx_stat_writing;
extern ngx_atomic_t *ngx_stat_waiting;
#endif
#define NGX_UPDATE_TIME …
#define NGX_POST_EVENTS …
extern sig_atomic_t ngx_event_timer_alarm;
extern ngx_uint_t ngx_event_flags;
extern ngx_module_t ngx_events_module;
extern ngx_module_t ngx_event_core_module;
#define ngx_event_get_conf(conf_ctx, module) …
void ngx_event_accept(ngx_event_t *ev);
ngx_int_t ngx_trylock_accept_mutex(ngx_cycle_t *cycle);
ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle);
u_char *ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len);
#if (NGX_DEBUG)
void ngx_debug_accepted_connection(ngx_event_conf_t *ecf, ngx_connection_t *c);
#endif
void ngx_process_events_and_timers(ngx_cycle_t *cycle);
ngx_int_t ngx_handle_read_event(ngx_event_t *rev, ngx_uint_t flags);
ngx_int_t ngx_handle_write_event(ngx_event_t *wev, size_t lowat);
#if (NGX_WIN32)
void ngx_event_acceptex(ngx_event_t *ev);
ngx_int_t ngx_event_post_acceptex(ngx_listening_t *ls, ngx_uint_t n);
u_char *ngx_acceptex_log_error(ngx_log_t *log, u_char *buf, size_t len);
#endif
ngx_int_t ngx_send_lowat(ngx_connection_t *c, size_t lowat);
#define ngx_event_ident(p) …
#include <ngx_event_timer.h>
#include <ngx_event_posted.h>
#include <ngx_event_udp.h>
#if (NGX_WIN32)
#include <ngx_iocp_module.h>
#endif
#endif