comparison src/event/ngx_event.h @ 206:9aa426375256

nginx-0.0.1-2003-12-05-10:11:46 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 05 Dec 2003 07:11:46 +0000
parents 4a9a2b1dd6fa
children 6e0fef527732
comparison
equal deleted inserted replaced
205:4a9a2b1dd6fa 206:9aa426375256
29 29
30 /* queue in mutex(), aio_read(), aio_write() */ 30 /* queue in mutex(), aio_read(), aio_write() */
31 ngx_event_t *prev; 31 ngx_event_t *prev;
32 ngx_event_t *next; 32 ngx_event_t *next;
33 33
34 ngx_rbtree_t rbtree;
35
36 #if 0 34 #if 0
37 ngx_event_t *timer_prev; 35 ngx_event_t *timer_prev;
38 ngx_event_t *timer_next; 36 ngx_event_t *timer_next;
39 37
40 ngx_msec_t timer_delta; 38 ngx_msec_t timer_delta;
41 #endif 39 #endif
42 40
43 ngx_log_t *log; 41 ngx_log_t *log;
42
43 /*
44 * ngx_rbtree_t rbtree;
45 */
46
47 ngx_int_t rbtree_key;
48 void *rbtree_left;
49 void *rbtree_right;
50 void *rbtree_parent;
51 char rbtree_color;
52
53 unsigned char oneshot:1;
54
55 unsigned char write:1;
56
57 /* used to detect the stale events in kqueue, rt signals and epoll */
58 unsigned char instance:1;
59
60 /*
61 * the event was passed or would be passed to a kernel;
62 * in aio mode - operation was posted.
63 */
64 unsigned char active:1;
65
66 /* the ready event; in aio mode 0 means that no operation can be posted */
67 unsigned char ready:1;
68
69 /* aio operation is complete */
70 unsigned char complete:1;
71
72 unsigned char eof:1;
73 unsigned char error:1;
74
75 unsigned short timedout:1;
76 unsigned short timer_set:1;
77
78 unsigned short delayed:1;
79
80 unsigned short read_discarded:1;
81
82 unsigned short ignore_econnreset:1;
83 unsigned short unexpected_eof:1;
84
85 unsigned short deferred_accept:1;
86
87 /* TODO: aio_eof and kq_eof can be the single pending_eof */
88 /* the pending eof in aio chain operation */
89 unsigned short aio_eof:1;
90
91 /* the pending eof reported by kqueue */
92 unsigned short kq_eof:1;
93
94 #if (WIN32)
95 /* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was succesfull */
96 unsigned short accept_context_updated:1;
97 #endif
98
99 #if (HAVE_KQUEUE)
100 unsigned short kq_vnode:1;
101
102 /* the pending errno reported by kqueue */
103 int kq_errno;
104 #endif
44 105
45 /* 106 /*
46 * kqueue only: 107 * kqueue only:
47 * accept: number of sockets that wait to be accepted 108 * accept: number of sockets that wait to be accepted
48 * read: bytes to read when event is ready 109 * read: bytes to read when event is ready
55 */ 116 */
56 117
57 #if (HAVE_KQUEUE) 118 #if (HAVE_KQUEUE)
58 int available; 119 int available;
59 #else 120 #else
60 unsigned available:1; 121 unsigned short available:1;
61 #endif
62
63 unsigned oneshot:1;
64
65 unsigned write:1;
66
67 /* used to detect the stale events in kqueue, rt signals and epoll */
68 unsigned instance:1;
69
70 /*
71 * the event was passed or would be passed to a kernel;
72 * in aio mode - operation was posted.
73 */
74 unsigned active:1;
75
76 /* the ready event; in aio mode 0 means that no operation can be posted */
77 unsigned ready:1;
78
79 /* aio operation is complete */
80 unsigned complete:1;
81
82 unsigned eof:1;
83 unsigned error:1;
84
85 unsigned timedout:1;
86 unsigned timer_set:1;
87
88 unsigned delayed:1;
89
90 unsigned read_discarded:1;
91
92 unsigned ignore_econnreset:1;
93 unsigned unexpected_eof:1;
94
95 unsigned deferred_accept:1;
96
97 /* TODO: aio_eof and kq_eof can be the single pending_eof */
98 /* the pending eof in aio chain operation */
99 unsigned aio_eof:1;
100
101 /* the pending eof reported by kqueue */
102 unsigned kq_eof:1;
103
104 #if (WIN32)
105 /* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was succesfull */
106 unsigned accept_context_updated:1;
107 #endif
108
109 #if (HAVE_KQUEUE)
110 unsigned kq_vnode:1;
111
112 /* the pending errno reported by kqueue */
113 int kq_errno;
114 #endif 122 #endif
115 123
116 124
117 #if (HAVE_AIO) 125 #if (HAVE_AIO)
118 126