diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2003-02-26 20:21:43 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2003-02-26 20:21:43 +0000 |
| commit | ff148df8f694212e2cf13f0d43532949433831a2 (patch) | |
| tree | 1323b3de05544f57639c20080db3ac386bc0050d /src/event/modules | |
| parent | 9a5f495afdf8cc1d33ae1741e1409c0bdcc3589d (diff) | |
| download | nginx-ff148df8f694212e2cf13f0d43532949433831a2.tar.gz nginx-ff148df8f694212e2cf13f0d43532949433831a2.tar.bz2 | |
nginx-0.0.1-2003-02-26-23:21:43 import
Diffstat (limited to 'src/event/modules')
| -rw-r--r-- | src/event/modules/ngx_aio_module.c | 37 | ||||
| -rw-r--r-- | src/event/modules/ngx_aio_module.h | 14 | ||||
| -rw-r--r-- | src/event/modules/ngx_kqueue_module.c | 2 |
3 files changed, 52 insertions, 1 deletions
diff --git a/src/event/modules/ngx_aio_module.c b/src/event/modules/ngx_aio_module.c index b18d4928a..f2d0e83c7 100644 --- a/src/event/modules/ngx_aio_module.c +++ b/src/event/modules/ngx_aio_module.c @@ -1,4 +1,39 @@ +#include <ngx_config.h> + +#include <ngx_core.h> +#include <ngx_types.h> +#include <ngx_log.h> +#include <ngx_connection.h> +#include <ngx_event.h> +#include <ngx_event_timer.h> + +#if (HAVE_KQUEUE) +#include <ngx_kqueue_module.h> +#endif + + +int ngx_aio_init(int max_connections, ngx_log_t *log) +{ +#if (HAVE_KQUEUE) + + int rc; + + rc = ngx_kqueue_init(max_connections, log); + + ngx_event_flags = NGX_HAVE_AIO_EVENT; + ngx_write_chain_proc = ngx_aio_write_chain; + + return rc; + +#endif +} + + + + + +#if 0 /* 1 */ int ngx_posix_aio_process_events(ngx_log_t *log) { @@ -47,4 +82,4 @@ void aio_sig_handler(int signo, siginfo_t *siginfo, void *context) { push siginfo->si_value.sival_ptr } - +#endif diff --git a/src/event/modules/ngx_aio_module.h b/src/event/modules/ngx_aio_module.h new file mode 100644 index 000000000..71eb9e4d7 --- /dev/null +++ b/src/event/modules/ngx_aio_module.h @@ -0,0 +1,14 @@ +#ifndef _NGX_AIO_MODULE_H_INCLUDED_ +#define _NGX_AIO_MODULE_H_INCLUDED_ + + +#include <ngx_types.h> +#include <ngx_log.h> +#include <ngx_event.h> + + +int ngx_aio_init(int max_connections, ngx_log_t *log); +int ngx_aio_process_events(ngx_log_t *log); + + +#endif /* _NGX_AIO_MODULE_H_INCLUDED_ */ diff --git a/src/event/modules/ngx_kqueue_module.c b/src/event/modules/ngx_kqueue_module.c index 501b4960e..fc0e34f62 100644 --- a/src/event/modules/ngx_kqueue_module.c +++ b/src/event/modules/ngx_kqueue_module.c @@ -79,6 +79,8 @@ int ngx_kqueue_init(int max_connections, ngx_log_t *log) #endif |NGX_HAVE_KQUEUE_EVENT; + ngx_write_chain_proc = ngx_freebsd_write_chain; + #endif #endif |
