[nginx] Events: honor NGX_USE_GREEDY_EVENT when kqueue support i...
Valentin Bartenev
vbart at nginx.com
Fri Jul 12 23:27:00 UTC 2013
details: http://hg.nginx.org/nginx/rev/13c006f0c40e
branches:
changeset: 5267:13c006f0c40e
user: Valentin Bartenev <vbart at nginx.com>
date: Sat Jul 13 03:24:30 2013 +0400
description:
Events: honor NGX_USE_GREEDY_EVENT when kqueue support is enabled.
Currently this flag is needed for epoll and rtsig, and though these methods
usually present on different platforms than kqueue, nginx can be compiled to
support all of them.
diffstat:
src/os/unix/ngx_readv_chain.c | 2 +-
src/os/unix/ngx_recv.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 8e7db77e5d88 -r 13c006f0c40e src/os/unix/ngx_readv_chain.c
--- a/src/os/unix/ngx_readv_chain.c Thu Jul 11 20:38:27 2013 +0400
+++ b/src/os/unix/ngx_readv_chain.c Sat Jul 13 03:24:30 2013 +0400
@@ -136,7 +136,7 @@ ngx_readv_chain(ngx_connection_t *c, ngx
return n;
}
- if (n < size) {
+ if (n < size && !(ngx_event_flags & NGX_USE_GREEDY_EVENT)) {
rev->ready = 0;
}
diff -r 8e7db77e5d88 -r 13c006f0c40e src/os/unix/ngx_recv.c
--- a/src/os/unix/ngx_recv.c Thu Jul 11 20:38:27 2013 +0400
+++ b/src/os/unix/ngx_recv.c Sat Jul 13 03:24:30 2013 +0400
@@ -87,7 +87,9 @@ ngx_unix_recv(ngx_connection_t *c, u_cha
return n;
}
- if ((size_t) n < size) {
+ if ((size_t) n < size
+ && !(ngx_event_flags & NGX_USE_GREEDY_EVENT))
+ {
rev->ready = 0;
}
More information about the nginx-devel
mailing list