| #include <ngx_connection.h> |
| #include <ngx_event_timer.h> |
| #include <ngx_kqueue_module.h> |
| int ngx_aio_init(int max_connections, ngx_log_t *log) |
| rc = ngx_kqueue_init(max_connections, log); |
| ngx_event_flags = NGX_HAVE_AIO_EVENT; |
| ngx_write_chain_proc = ngx_aio_write_chain; |
| int ngx_posix_aio_process_events(ngx_log_t *log) |
| sigsuspend()/sigwaitinfo()/sigtimedwait(); |
| int ngx_posix_aio_process_events(ngx_log_t *log) |
| /* BUG: SIGIO can be delivered before aio_*() */ |
| aio_suspend()/aiowait()/aio_waitcomplete() with timeout |
| if (ngx_socket_errno == NGX_EINTR) |
| select()/accept() nb listen sockets |
| int ngx_posix_aio_process_events(ngx_log_t *log) |
| /* BUG: AIO signal can be delivered before select() */ |
| if (ngx_socket_errno == NGX_EINTR) |
| void aio_sig_handler(int signo, siginfo_t *siginfo, void *context) |
| push siginfo->si_value.sival_ptr |