Mercurial > hg > nginx-quic
view src/event/modules/ngx_aio_module.c @ 62:8ccba41a678e
nginx-0.0.1-2003-02-12-09:55:42 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 12 Feb 2003 06:55:42 +0000 |
parents | 669801705ab1 |
children | 36d2c25cc9bb |
line wrap: on
line source
/* 1 */ int ngx_posix_aio_process_events(ngx_log_t *log) { listen via SIGIO; aio_* via SIGxxx; sigsuspend()/sigwaitinfo()/sigtimedwait(); } /* 2 */ int ngx_posix_aio_process_events(ngx_log_t *log) { unmask signal listen via SIGIO; /* BUG: SIGIO can be delivered before aio_*() */ aio_suspend()/aiowait()/aio_waitcomplete() with timeout mask signal if (ngx_socket_errno == NGX_EINTR) look listen select()/accept() nb listen sockets else aio } /* 3 */ int ngx_posix_aio_process_events(ngx_log_t *log) { unmask signal /* BUG: AIO signal can be delivered before select() */ select(listen); mask signal if (ngx_socket_errno == NGX_EINTR) look ready array } void aio_sig_handler(int signo, siginfo_t *siginfo, void *context) { push siginfo->si_value.sival_ptr }