Welcome! Log In Create A New Profile

Advanced

[nginx] Events: honor NGX_USE_GREEDY_EVENT when kqueue support i...

Valentin Bartenev
July 12, 2013 07:28PM
details: http://hg.nginx.org/nginx/rev/13c006f0c40e
branches:
changeset: 5267:13c006f0c40e
user: Valentin Bartenev <vbart@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;
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Events: honor NGX_USE_GREEDY_EVENT when kqueue support i...

Valentin Bartenev 890 July 12, 2013 07:28PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 110
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready