Mercurial > hg > nginx
changeset 3044:a1d54c705f38
*) move small declarations in appropriate places and delete the surplus
header files
*) delete insignificant comments
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 25 Aug 2009 09:09:13 +0000 |
parents | a66d6dfd53f1 |
children | 46b207c9dafd |
files | src/event/modules/ngx_aio_module.c src/event/modules/ngx_epoll_module.c src/event/modules/ngx_kqueue_module.c src/event/modules/ngx_kqueue_module.h src/os/unix/ngx_aio.h src/os/unix/ngx_aio_read.c src/os/unix/ngx_aio_read_chain.c src/os/unix/ngx_aio_write.c src/os/unix/ngx_aio_write_chain.c src/os/unix/ngx_os.h |
diffstat | 10 files changed, 14 insertions(+), 72 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/modules/ngx_aio_module.c Tue Aug 25 09:06:21 2009 +0000 +++ b/src/event/modules/ngx_aio_module.c Tue Aug 25 09:09:13 2009 +0000 @@ -7,11 +7,9 @@ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> -#include <ngx_aio.h> + -#if (NGX_HAVE_KQUEUE) -#include <ngx_kqueue_module.h> -#endif +extern ngx_event_module_t ngx_kqueue_module_ctx; static ngx_int_t ngx_aio_init(ngx_cycle_t *cycle, ngx_msec_t timer);
--- a/src/event/modules/ngx_epoll_module.c Tue Aug 25 09:06:21 2009 +0000 +++ b/src/event/modules/ngx_epoll_module.c Tue Aug 25 09:09:13 2009 +0000 @@ -43,10 +43,6 @@ epoll_data_t data; }; -int epoll_create(int size); -int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event); -int epoll_wait(int epfd, struct epoll_event *events, int nevents, int timeout); - int epoll_create(int size) { return -1;
--- a/src/event/modules/ngx_kqueue_module.c Tue Aug 25 09:06:21 2009 +0000 +++ b/src/event/modules/ngx_kqueue_module.c Tue Aug 25 09:09:13 2009 +0000 @@ -7,7 +7,6 @@ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> -#include <ngx_kqueue_module.h> typedef struct {
--- a/src/event/modules/ngx_kqueue_module.h Tue Aug 25 09:06:21 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - -/* - * Copyright (C) Igor Sysoev - */ - - -#ifndef _NGX_KQUEUE_MODULE_H_INCLUDED_ -#define _NGX_KQUEUE_MODULE_H_INCLUDED_ - - -extern int ngx_kqueue; -extern ngx_module_t ngx_kqueue_module; -extern ngx_event_module_t ngx_kqueue_module_ctx; - - -#endif /* _NGX_KQUEUE_MODULE_H_INCLUDED_ */
--- a/src/os/unix/ngx_aio.h Tue Aug 25 09:06:21 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - -/* - * Copyright (C) Igor Sysoev - */ - - -#ifndef _NGX_AIO_H_INCLUDED_ -#define _NGX_AIO_H_INCLUDED_ - - -#include <ngx_core.h> - - -ssize_t ngx_aio_read(ngx_connection_t *c, u_char *buf, size_t size); -ssize_t ngx_aio_read_chain(ngx_connection_t *c, ngx_chain_t *cl); -ssize_t ngx_aio_write(ngx_connection_t *c, u_char *buf, size_t size); -ngx_chain_t *ngx_aio_write_chain(ngx_connection_t *c, ngx_chain_t *in, - off_t limit); - - -#endif /* _NGX_AIO_H_INCLUDED_ */
--- a/src/os/unix/ngx_aio_read.c Tue Aug 25 09:06:21 2009 +0000 +++ b/src/os/unix/ngx_aio_read.c Tue Aug 25 09:09:13 2009 +0000 @@ -7,20 +7,10 @@ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> -#include <ngx_aio.h> - -#if (NGX_HAVE_KQUEUE) -#include <ngx_kqueue_module.h> -#endif -/* - * the ready data requires 3 syscalls: - * aio_write(), aio_error(), aio_return() - * the non-ready data requires 4 (kqueue) or 5 syscalls: - * aio_write(), aio_error(), notifiction, aio_error(), aio_return() - * timeout, aio_cancel(), aio_error() - */ +extern int ngx_kqueue; + ssize_t ngx_aio_read(ngx_connection_t *c, u_char *buf, size_t size)
--- a/src/os/unix/ngx_aio_read_chain.c Tue Aug 25 09:06:21 2009 +0000 +++ b/src/os/unix/ngx_aio_read_chain.c Tue Aug 25 09:09:13 2009 +0000 @@ -7,7 +7,6 @@ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> -#include <ngx_aio.h> ssize_t
--- a/src/os/unix/ngx_aio_write.c Tue Aug 25 09:06:21 2009 +0000 +++ b/src/os/unix/ngx_aio_write.c Tue Aug 25 09:09:13 2009 +0000 @@ -7,20 +7,10 @@ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> -#include <ngx_aio.h> - -#if (NGX_HAVE_KQUEUE) -#include <ngx_kqueue_module.h> -#endif -/* - * the ready data requires 3 syscalls: - * aio_write(), aio_error(), aio_return() - * the non-ready data requires 4 (kqueue) or 5 syscalls: - * aio_write(), aio_error(), notifiction, aio_error(), aio_return() - * timeout, aio_cancel(), aio_error() - */ +extern int ngx_kqueue; + ssize_t ngx_aio_write(ngx_connection_t *c, u_char *buf, size_t size)
--- a/src/os/unix/ngx_aio_write_chain.c Tue Aug 25 09:06:21 2009 +0000 +++ b/src/os/unix/ngx_aio_write_chain.c Tue Aug 25 09:09:13 2009 +0000 @@ -7,7 +7,6 @@ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> -#include <ngx_aio.h> ngx_chain_t *
--- a/src/os/unix/ngx_os.h Tue Aug 25 09:06:21 2009 +0000 +++ b/src/os/unix/ngx_os.h Tue Aug 25 09:09:13 2009 +0000 @@ -47,6 +47,14 @@ ngx_chain_t *ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit); +#if (NGX_HAVE_AIO) +ssize_t ngx_aio_read(ngx_connection_t *c, u_char *buf, size_t size); +ssize_t ngx_aio_read_chain(ngx_connection_t *c, ngx_chain_t *cl); +ssize_t ngx_aio_write(ngx_connection_t *c, u_char *buf, size_t size); +ngx_chain_t *ngx_aio_write_chain(ngx_connection_t *c, ngx_chain_t *in, + off_t limit); +#endif + extern ngx_os_io_t ngx_os_io; extern ngx_int_t ngx_ncpu;