]> git.kaiwu.me - nginx.git/commitdiff
*) move small declarations in appropriate places and delete the surplus
authorIgor Sysoev <igor@sysoev.ru>
Tue, 25 Aug 2009 09:09:13 +0000 (09:09 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 25 Aug 2009 09:09:13 +0000 (09:09 +0000)
   header files
*) delete insignificant comments

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 [deleted file]
src/os/unix/ngx_aio.h [deleted file]
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

index a4d40d828b1cc4dc1820bb29506c08dde4daf6a6..71f7d40c63c9ca764ad1c75d0a41c9ff452a9dc0 100644 (file)
@@ -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);
index 75fc736e7050bc7ede5809aa38cd09d7e9913f1e..4e016798a859c1b9a01cf54d61c1114602bc4295 100644 (file)
@@ -43,10 +43,6 @@ struct epoll_event {
     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;
index 7250830d3bc0ceacf6edc462d2a5d760bacdac55..02230ca7df9013c1639c4b0b0841185e4c38ea54 100644 (file)
@@ -7,7 +7,6 @@
 #include <ngx_config.h>
 #include <ngx_core.h>
 #include <ngx_event.h>
-#include <ngx_kqueue_module.h>
 
 
 typedef struct {
diff --git a/src/event/modules/ngx_kqueue_module.h b/src/event/modules/ngx_kqueue_module.h
deleted file mode 100644 (file)
index 096d4ae..0000000
+++ /dev/null
@@ -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_ */
diff --git a/src/os/unix/ngx_aio.h b/src/os/unix/ngx_aio.h
deleted file mode 100644 (file)
index c286dbd..0000000
+++ /dev/null
@@ -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_ */
index 206f0efb2c42e0e25da7011fad43271d73d5b45d..1e41bac5f8db08a176e2f6861b9d36515880cacd 100644 (file)
@@ -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
 
+extern int  ngx_kqueue;
 
-/*
- * 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()
- */
 
 ssize_t
 ngx_aio_read(ngx_connection_t *c, u_char *buf, size_t size)
index da85ed9ea4704308dca830424cd4421d9c9c89d7..28b9c8fa94ab1afbf6329b627d19436f3942b692 100644 (file)
@@ -7,7 +7,6 @@
 #include <ngx_config.h>
 #include <ngx_core.h>
 #include <ngx_event.h>
-#include <ngx_aio.h>
 
 
 ssize_t
index 57e751d10209af12da8068ab0e448cae2af26c21..9138af16aa7f7706b63bf2dc520df9ba178f66a7 100644 (file)
@@ -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
 
+extern int  ngx_kqueue;
 
-/*
- * 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()
- */
 
 ssize_t
 ngx_aio_write(ngx_connection_t *c, u_char *buf, size_t size)
index 6a156e91bcbbf079f9bb9ea23a34053cdade9f9e..7167896901b1d50bd055f5003f47834874c9d00c 100644 (file)
@@ -7,7 +7,6 @@
 #include <ngx_config.h>
 #include <ngx_core.h>
 #include <ngx_event.h>
-#include <ngx_aio.h>
 
 
 ngx_chain_t *
index a8b6c6dc08c2899030496034322abdd168619aa0..f1d8e68248c23477b31c9c55f9460a461bbef036 100644 (file)
@@ -47,6 +47,14 @@ ssize_t ngx_unix_send(ngx_connection_t *c, u_char *buf, size_t size);
 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;