[nginx] Events: ngx_event_t size reduction by grouping bit fields.

Igor Sysoev igor at sysoev.ru
Fri May 15 14:16:06 UTC 2015


details:   http://hg.nginx.org/nginx/rev/0b8f6f75245d
branches:  
changeset: 6145:0b8f6f75245d
user:      Igor Sysoev <igor at sysoev.ru>
date:      Fri May 15 17:15:33 2015 +0300
description:
Events: ngx_event_t size reduction by grouping bit fields.

diffstat:

 src/event/ngx_event.h |  17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diffs (34 lines):

diff -r d0a84ae2fb48 -r 0b8f6f75245d src/event/ngx_event.h
--- a/src/event/ngx_event.h	Wed May 06 17:04:00 2015 +0300
+++ b/src/event/ngx_event.h	Fri May 15 17:15:33 2015 +0300
@@ -68,6 +68,14 @@ struct ngx_event_s {
 
     unsigned         posted:1;
 
+    unsigned         closed:1;
+
+    /* to test on worker exit */
+    unsigned         channel:1;
+    unsigned         resolver:1;
+
+    unsigned         cancelable:1;
+
 #if (NGX_WIN32)
     /* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was successful */
     unsigned         accept_context_updated:1;
@@ -116,15 +124,6 @@ struct ngx_event_s {
     /* the posted queue */
     ngx_queue_t      queue;
 
-    unsigned         closed:1;
-
-    /* to test on worker exit */
-    unsigned         channel:1;
-    unsigned         resolver:1;
-
-    unsigned         cancelable:1;
-
-
 #if 0
 
     /* the threads support */



More information about the nginx-devel mailing list