Mercurial > hg > nginx-quic
annotate src/misc/ngx_cpp_test_module.cpp @ 4164:c48662671609 stable-1.0
Merging r4130, r4131, r4135:
Linux AIO related fixes:
*) Fixing Linux AIO syscalls return value handling:
syscall(2) uses usual libc convention, it returns -1 on error and
sets errno. Obsolete _syscall(2) returns negative value of error.
*) Fixing Linux AIO initiatialization: AIO operations are disabled
if kernel does not support them. Previously worker just exited.
*) The "worker_aio_requests" directive.
The default value is 32 AIO simultaneous requests per worker. Previously
they were hardcoded to 1024, and it was too large, since Linux allocated
them early on io_setup(), but not on request itself. So with default value
of /proc/sys/fs/aio-max-nr equal to 65536 only 64 worker processes could
be run simultaneously. 32 AIO requests are enough for modern disks even if
server runs only 1 worker.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 30 Sep 2011 14:12:53 +0000 |
parents | 69ef10ad7011 |
children | 4c36e15651f7 |
rev | line source |
---|---|
2157 | 1 |
2 // stub module to test header files' C++ compatibilty | |
3 | |
4 extern "C" { | |
5 #include <ngx_config.h> | |
6 #include <ngx_core.h> | |
7 #include <ngx_event.h> | |
8 #include <ngx_event_connect.h> | |
9 #include <ngx_event_pipe.h> | |
10 | |
11 #include <ngx_http.h> | |
12 | |
13 #include <ngx_mail.h> | |
14 #include <ngx_mail_pop3_module.h> | |
15 #include <ngx_mail_imap_module.h> | |
16 #include <ngx_mail_smtp_module.h> | |
17 } | |
18 | |
19 // nginx header files should go before other, because they define 64-bit off_t | |
20 // #include <string> | |
21 | |
22 | |
23 void | |
24 ngx_cpp_test_handler(void *data) | |
25 { | |
26 return; | |
27 } |