From 37d24e7e3be648a6f73bad18dcf53798a7a1aeb0 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 1 Sep 2014 18:20:18 +0400 Subject: Events: processing of posted events changed from LIFO to FIFO. In theory, this can provide a bit better distribution of latencies. Also it simplifies the code, since ngx_queue_t is now used instead of custom implementation. --- src/event/ngx_event.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/event/ngx_event.h') diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h index e9520b667..6531ec7ad 100644 --- a/src/event/ngx_event.h +++ b/src/event/ngx_event.h @@ -74,6 +74,8 @@ struct ngx_event_s { /* the pending eof reported by kqueue, epoll or in aio chain operation */ unsigned pending_eof:1; + unsigned posted:1; + #if (NGX_WIN32) /* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was successful */ unsigned accept_context_updated:1; @@ -125,16 +127,15 @@ struct ngx_event_s { ngx_rbtree_node_t timer; + /* the posted queue */ + ngx_queue_t queue; + unsigned closed:1; /* to test on worker exit */ unsigned channel:1; unsigned resolver:1; - /* the links of the posted queue */ - ngx_event_t *next; - ngx_event_t **prev; - #if 0 -- cgit