Mercurial > hg > nginx-quic
annotate src/event/ngx_event.h @ 182:3c49eaf3f522
nginx-0.0.1-2003-11-13-09:14:05 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 13 Nov 2003 06:14:05 +0000 |
parents | e92c2c647c57 |
children | c1f3a3c7c5db |
rev | line source |
---|---|
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
1 #ifndef _NGX_EVENT_H_INCLUDED_ |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
2 #define _NGX_EVENT_H_INCLUDED_ |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
3 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
4 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 #include <ngx_config.h> |
92
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
91
diff
changeset
|
6 #include <ngx_core.h> |
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
91
diff
changeset
|
7 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 |
26
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
23
diff
changeset
|
9 #define NGX_INVALID_INDEX 0x80000000 |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
23
diff
changeset
|
10 |
91
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
11 |
102
7e86d028d8f0
nginx-0.0.1-2003-06-06-18:59:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
12 #if (HAVE_IOCP) |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 |
59
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
14 typedef struct { |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
15 WSAOVERLAPPED ovlp; |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
16 ngx_event_t *event; |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
17 int error; |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
18 } ngx_event_ovlp_t; |
102
7e86d028d8f0
nginx-0.0.1-2003-06-06-18:59:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
19 |
59
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
20 #endif |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
21 |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
22 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
23 struct ngx_event_s { |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
24 void *data; |
170
c42be4185301
nginx-0.0.1-2003-11-03-01:56:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
166
diff
changeset
|
25 /* TODO rename to handler, move flags to struct start */ |
87
5f6d848dcbef
nginx-0.0.1-2003-05-13-20:02:32 import
Igor Sysoev <igor@sysoev.ru>
parents:
86
diff
changeset
|
26 void (*event_handler)(ngx_event_t *ev); |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
27 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
28 void *context; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
29 char *action; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
30 |
36
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
32
diff
changeset
|
31 unsigned int index; |
17
8dd06e2844f5
nginx-0.0.1-2002-09-27-19:05:29 import
Igor Sysoev <igor@sysoev.ru>
parents:
9
diff
changeset
|
32 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
33 /* queue in mutex(), aio_read(), aio_write() */ |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
34 ngx_event_t *prev; |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
35 ngx_event_t *next; |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
36 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
37 ngx_event_t *timer_prev; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
38 ngx_event_t *timer_next; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
39 |
50
b288069a8696
nginx-0.0.1-2003-01-23-21:47:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
44
diff
changeset
|
40 ngx_msec_t timer_delta; |
b288069a8696
nginx-0.0.1-2003-01-23-21:47:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
44
diff
changeset
|
41 ngx_msec_t timer; |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
42 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
43 ngx_log_t *log; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
44 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
45 /* |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
46 * kqueue only: |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
47 * accept: number of sockets that wait to be accepted |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
48 * read: bytes to read |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
49 * write: available space in buffer |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
50 * |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
51 * otherwise: |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
52 * accept: 1 if accept many, 0 otherwise |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
53 */ |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
54 int available; |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
55 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
7
diff
changeset
|
56 unsigned oneshot:1; |
23
f540a63026c9
nginx-0.0.1-2002-12-06-19:32:33 import
Igor Sysoev <igor@sysoev.ru>
parents:
17
diff
changeset
|
57 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
58 unsigned write:1; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
59 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
60 /* used to detect the stale events in kqueue, rt signals and epoll */ |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
61 unsigned instance:1; |
86
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
79
diff
changeset
|
62 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
63 /* |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
64 * the event was passed or would be passed to a kernel; |
166
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
65 * in aio mode - operation was posted. |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
66 */ |
39
83fa61cd3d2f
nginx-0.0.1-2002-12-24-20:30:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
38
diff
changeset
|
67 unsigned active:1; |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
68 |
166
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
69 /* the ready event; in aio mode 0 means that no operation can be posted */ |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
70 unsigned ready:1; |
166
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
71 |
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
72 /* aio operation is complete */ |
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
73 unsigned complete:1; |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
74 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
75 unsigned eof:1; |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
76 unsigned error:1; |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
77 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
78 unsigned timedout:1; |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
79 unsigned timer_set:1; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
80 |
77
57c2e18d3572
nginx-0.0.1-2003-04-17-21:59:35 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
81 unsigned delayed:1; |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
7
diff
changeset
|
82 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
83 unsigned read_discarded:1; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
84 |
67
5a7d1aaa1618
nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
65
diff
changeset
|
85 unsigned ignore_econnreset:1; |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
86 unsigned unexpected_eof:1; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
87 |
6
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
88 unsigned deferred_accept:1; |
59
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
89 |
166
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
90 /* TODO: aio_eof and kq_eof can be the single pending_eof */ |
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
91 /* the pending eof in aio chain operation */ |
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
92 unsigned aio_eof:1; |
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
93 |
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
94 /* the pending eof reported by kqueue */ |
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
95 unsigned kq_eof:1; |
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
96 |
102
7e86d028d8f0
nginx-0.0.1-2003-06-06-18:59:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
97 #if (WIN32) |
166
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
98 /* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was succesfull */ |
102
7e86d028d8f0
nginx-0.0.1-2003-06-06-18:59:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
99 unsigned accept_context_updated:1; |
7e86d028d8f0
nginx-0.0.1-2003-06-06-18:59:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
100 #endif |
7e86d028d8f0
nginx-0.0.1-2003-06-06-18:59:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
101 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
102 #if (HAVE_KQUEUE) |
166
389d7ee9fa60
nginx-0.0.1-2003-10-30-11:51:06 import
Igor Sysoev <igor@sysoev.ru>
parents:
164
diff
changeset
|
103 /* the pending errno reported by kqueue */ |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
104 int kq_errno; |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
105 #endif |
53
d1e42f1b8fd4
nginx-0.0.1-2003-01-27-00:08:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
50
diff
changeset
|
106 |
64
34d647deb1da
nginx-0.0.1-2003-03-04-09:33:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
63
diff
changeset
|
107 #if (HAVE_LOWAT_EVENT) /* kqueue's NOTE_LOWAT */ |
34d647deb1da
nginx-0.0.1-2003-03-04-09:33:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
63
diff
changeset
|
108 int lowat; |
34d647deb1da
nginx-0.0.1-2003-03-04-09:33:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
63
diff
changeset
|
109 #endif |
34d647deb1da
nginx-0.0.1-2003-03-04-09:33:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
63
diff
changeset
|
110 |
59
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
111 |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
112 #if (HAVE_AIO) |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
113 |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
114 #if (HAVE_IOCP) |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
115 ngx_event_ovlp_t ovlp; |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
116 #else |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
117 struct aiocb aiocb; |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
118 #endif |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
119 |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
120 #endif |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
121 |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
122 |
53
d1e42f1b8fd4
nginx-0.0.1-2003-01-27-00:08:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
50
diff
changeset
|
123 #if 0 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
124 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
125 /* the threads support */ |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
126 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
127 /* |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
128 * the event thread context, we store it here |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
129 * if $(CC) does not understand __thread declaration |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
130 * and pthread_getspecific() is too costly |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
131 */ |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
132 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
133 void *thr_ctx; |
53
d1e42f1b8fd4
nginx-0.0.1-2003-01-27-00:08:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
50
diff
changeset
|
134 |
d1e42f1b8fd4
nginx-0.0.1-2003-01-27-00:08:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
50
diff
changeset
|
135 #if (NGX_EVENT_T_PADDING) |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
136 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
137 /* event should not cross cache line in SMP */ |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
138 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
139 int padding[NGX_EVENT_T_PADDING]; |
53
d1e42f1b8fd4
nginx-0.0.1-2003-01-27-00:08:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
50
diff
changeset
|
140 #endif |
d1e42f1b8fd4
nginx-0.0.1-2003-01-27-00:08:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
50
diff
changeset
|
141 #endif |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
142 }; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
143 |
86
3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
79
diff
changeset
|
144 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
145 typedef struct { |
91
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
146 int (*add)(ngx_event_t *ev, int event, u_int flags); |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
147 int (*del)(ngx_event_t *ev, int event, u_int flags); |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
148 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
149 int (*enable)(ngx_event_t *ev, int event, u_int flags); |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
150 int (*disable)(ngx_event_t *ev, int event, u_int flags); |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
151 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
152 int (*add_conn)(ngx_connection_t *c); |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
153 int (*del_conn)(ngx_connection_t *c); |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
154 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
155 int (*process)(ngx_log_t *log); |
113
d7f606e25b99
nginx-0.0.1-2003-07-04-19:10:33 import
Igor Sysoev <igor@sysoev.ru>
parents:
109
diff
changeset
|
156 int (*init)(ngx_cycle_t *cycle); |
d7f606e25b99
nginx-0.0.1-2003-07-04-19:10:33 import
Igor Sysoev <igor@sysoev.ru>
parents:
109
diff
changeset
|
157 void (*done)(ngx_cycle_t *cycle); |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
158 } ngx_event_actions_t; |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
159 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
1
diff
changeset
|
160 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
161 extern ngx_event_actions_t ngx_event_actions; |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
162 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
163 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
164 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
165 * The event filter requires to read/write the whole data - |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
166 * select, poll, /dev/poll, kqueue. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
167 */ |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
168 #define NGX_USE_LEVEL_EVENT 0x00000001 |
57
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
169 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
170 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
171 * The event filter is deleted after a notification without an additional |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
172 * syscall - select, poll, kqueue. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
173 */ |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
174 #define NGX_USE_ONESHOT_EVENT 0x00000002 |
57
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
175 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
176 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
177 * The event filter notifies only the changes and an initial level - kqueue. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
178 */ |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
179 #define NGX_USE_CLEAR_EVENT 0x00000004 |
57
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
180 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
181 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
182 * The event filter has kqueue features - the eof flag, errno, |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
183 * available data, etc |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
184 */ |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
185 #define NGX_HAVE_KQUEUE_EVENT 0x00000008 |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
59
diff
changeset
|
186 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
187 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
188 * The event filter supports low water mark - kqueue's NOTE_LOWAT. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
189 * kqueue in FreeBSD 4.1-4.2 has no NOTE_LOWAT so we need a separate flag. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
190 */ |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
191 #define NGX_HAVE_LOWAT_EVENT 0x00000010 |
64
34d647deb1da
nginx-0.0.1-2003-03-04-09:33:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
63
diff
changeset
|
192 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
193 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
194 * The event filter notifies only the changes (the edges) |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
195 * but not an initial level - epoll. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
196 */ |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
197 #define NGX_USE_EDGE_EVENT 0x00000020 |
60
50186b49f2ad
nginx-0.0.1-2003-02-11-10:14:40 import
Igor Sysoev <igor@sysoev.ru>
parents:
59
diff
changeset
|
198 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
199 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
200 * No need to add or delete the event filters - rt signals. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
201 */ |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
202 #define NGX_USE_SIGIO_EVENT 0x00000040 |
57
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
203 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
204 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
205 * No need to add or delete the event filters - overlapped, aio_read, |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
206 * aioread, io_submit. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
207 */ |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
208 #define NGX_USE_AIO_EVENT 0x00000080 |
26
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
23
diff
changeset
|
209 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
210 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
211 * Need to add socket or handle only once - i/o completion port. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
212 * It also requires HAVE_AIO_EVENT and NGX_HAVE_AIO_EVENT to be set. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
213 */ |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
214 #define NGX_USE_IOCP_EVENT 0x00000100 |
67
5a7d1aaa1618
nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
65
diff
changeset
|
215 |
5a7d1aaa1618
nginx-0.0.1-2003-03-11-23:38:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
65
diff
changeset
|
216 |
64
34d647deb1da
nginx-0.0.1-2003-03-04-09:33:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
63
diff
changeset
|
217 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
218 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
219 * The event filter is deleted before the closing file. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
220 * Has no meaning for select, poll, epoll. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
221 * |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
222 * kqueue: kqueue deletes event filters for file that closed |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
223 * so we need only to delete filters in user-level batch array |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
224 * /dev/poll: we need to flush POLLREMOVE event before closing file |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
225 */ |
92
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
91
diff
changeset
|
226 |
53
d1e42f1b8fd4
nginx-0.0.1-2003-01-27-00:08:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
50
diff
changeset
|
227 #define NGX_CLOSE_EVENT 1 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
228 |
26
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
23
diff
changeset
|
229 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
230 #if (HAVE_KQUEUE) |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
231 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
232 #define NGX_READ_EVENT EVFILT_READ |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
233 #define NGX_WRITE_EVENT EVFILT_WRITE |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
234 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
235 /* |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
236 * NGX_CLOSE_EVENT is the module flag and it would not go into a kernel |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
237 * so we need to choose the value that would not interfere with any existent |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
238 * and future flags. kqueue has such values - EV_FLAG1, EV_EOF and EV_ERROR. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
239 * They are reserved and cleared on a kernel entrance. |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
240 */ |
69
e43f406e4525
nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
67
diff
changeset
|
241 #undef NGX_CLOSE_EVENT |
e43f406e4525
nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
67
diff
changeset
|
242 #define NGX_CLOSE_EVENT EV_FLAG1 |
e43f406e4525
nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
67
diff
changeset
|
243 |
6
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
244 #define NGX_LEVEL_EVENT 0 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
245 #define NGX_ONESHOT_EVENT EV_ONESHOT |
69
e43f406e4525
nginx-0.0.1-2003-03-20-19:09:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
67
diff
changeset
|
246 #define NGX_CLEAR_EVENT EV_CLEAR |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
7
diff
changeset
|
247 |
9
6f58641241bb
nginx-0.0.1-2002-09-07-14:14:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
248 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
249 #elif (HAVE_POLL) |
36
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
32
diff
changeset
|
250 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
32
diff
changeset
|
251 #define NGX_READ_EVENT POLLIN |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
32
diff
changeset
|
252 #define NGX_WRITE_EVENT POLLOUT |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
32
diff
changeset
|
253 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
32
diff
changeset
|
254 #define NGX_LEVEL_EVENT 0 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
32
diff
changeset
|
255 #define NGX_ONESHOT_EVENT 1 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
32
diff
changeset
|
256 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
257 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
258 #elif (HAVE_DEVPOLL) |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
259 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
260 #define NGX_READ_EVENT POLLIN |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
261 #define NGX_WRITE_EVENT POLLOUT |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
262 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
263 #define NGX_LEVEL_EVENT 0 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
264 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
265 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
266 #else /* select */ |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
267 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
268 #define NGX_READ_EVENT 0 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
269 #define NGX_WRITE_EVENT 1 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
270 |
6
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
271 #define NGX_LEVEL_EVENT 0 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
272 #define NGX_ONESHOT_EVENT 1 |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
273 |
31
d1ebcc555037
nginx-0.0.1-2002-12-18-19:31:23 import
Igor Sysoev <igor@sysoev.ru>
parents:
26
diff
changeset
|
274 #endif /* HAVE_KQUEUE */ |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
275 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
276 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
277 #if (HAVE_IOCP_EVENT) |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
278 #define NGX_IOCP_ACCEPT 0 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
279 #define NGX_IOCP_IO 1 |
92
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
91
diff
changeset
|
280 #endif |
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
91
diff
changeset
|
281 |
1
d220029ac7f3
nginx-0.0.1-2002-08-15-21:20:26 import
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
282 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
283 #ifndef NGX_CLEAR_EVENT |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
284 #define NGX_CLEAR_EVENT 0 /* dummy declaration */ |
50
b288069a8696
nginx-0.0.1-2003-01-23-21:47:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
44
diff
changeset
|
285 #endif |
1
d220029ac7f3
nginx-0.0.1-2002-08-15-21:20:26 import
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
286 |
d220029ac7f3
nginx-0.0.1-2002-08-15-21:20:26 import
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
287 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
288 #define ngx_process_events ngx_event_actions.process |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
289 #define ngx_add_event ngx_event_actions.add |
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
290 #define ngx_del_event ngx_event_actions.del |
97
70d2345a903f
nginx-0.0.1-2003-05-29-17:02:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
96
diff
changeset
|
291 #define ngx_add_conn ngx_event_actions.add_conn |
94
8220378432a8
nginx-0.0.1-2003-05-22-19:23:47 import
Igor Sysoev <igor@sysoev.ru>
parents:
93
diff
changeset
|
292 #define ngx_del_conn ngx_event_actions.del_conn |
59
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
293 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
294 #define ngx_add_timer ngx_event_add_timer |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
295 #define ngx_del_timer ngx_event_del_timer |
1
d220029ac7f3
nginx-0.0.1-2002-08-15-21:20:26 import
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
296 |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
297 |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
298 #define ngx_recv ngx_io.recv |
139
54307053f185
nginx-0.0.1-2003-10-07-19:30:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
114
diff
changeset
|
299 #define ngx_recv_chain ngx_io.recv_chain |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
300 #define ngx_write_chain ngx_io.send_chain |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
301 |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
302 |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
303 |
96
a23d010f356d
nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
94
diff
changeset
|
304 #define NGX_EVENT_MODULE 0x544E5645 /* "EVNT" */ |
90
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
87
diff
changeset
|
305 #define NGX_EVENT_CONF 0x00200000 |
91
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
306 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
307 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
308 typedef struct { |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
309 int connections; |
92
19cc647ecd91
nginx-0.0.1-2003-05-20-19:37:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
91
diff
changeset
|
310 int timer_queues; |
93
738fe44c70d5
nginx-0.0.1-2003-05-21-17:28:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
92
diff
changeset
|
311 int use; |
91
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
312 } ngx_event_conf_t; |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
313 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
314 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
315 typedef struct { |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
316 ngx_str_t *name; |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
317 |
114
ac69ab96328d
nginx-0.0.1-2003-07-07-10:11:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
113
diff
changeset
|
318 void *(*create_conf)(ngx_cycle_t *cycle); |
ac69ab96328d
nginx-0.0.1-2003-07-07-10:11:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
113
diff
changeset
|
319 char *(*init_conf)(ngx_cycle_t *cycle, void *conf); |
91
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
320 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
321 ngx_event_actions_t actions; |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
322 } ngx_event_module_t; |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
323 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
324 |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
325 |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
326 extern int ngx_event_flags; |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
327 extern ngx_module_t ngx_events_module; |
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
328 extern ngx_module_t ngx_event_core_module; |
91
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
329 |
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
330 |
113
d7f606e25b99
nginx-0.0.1-2003-07-04-19:10:33 import
Igor Sysoev <igor@sysoev.ru>
parents:
109
diff
changeset
|
331 #define ngx_event_get_conf(conf_ctx, module) \ |
d7f606e25b99
nginx-0.0.1-2003-07-04-19:10:33 import
Igor Sysoev <igor@sysoev.ru>
parents:
109
diff
changeset
|
332 (*(ngx_get_conf(conf_ctx, ngx_events_module))) [module.ctx_index]; |
90
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
87
diff
changeset
|
333 |
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
87
diff
changeset
|
334 |
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
87
diff
changeset
|
335 |
87
5f6d848dcbef
nginx-0.0.1-2003-05-13-20:02:32 import
Igor Sysoev <igor@sysoev.ru>
parents:
86
diff
changeset
|
336 void ngx_event_accept(ngx_event_t *ev); |
5f6d848dcbef
nginx-0.0.1-2003-05-13-20:02:32 import
Igor Sysoev <igor@sysoev.ru>
parents:
86
diff
changeset
|
337 |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
338 #if (WIN32) |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
339 void ngx_event_acceptex(ngx_event_t *ev); |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
340 int ngx_event_post_acceptex(ngx_listening_t *ls, int n); |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
341 #endif |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
342 |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
343 |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
344 |
91
637625a2acdb
nginx-0.0.1-2003-05-19-20:39:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
90
diff
changeset
|
345 #include <ngx_event_timer.h> |
163
fb61ba77beba
nginx-0.0.1-2003-10-28-18:45:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
144
diff
changeset
|
346 |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
347 #if (WIN32) |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
348 #include <ngx_iocp_module.h> |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
349 #endif |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
102
diff
changeset
|
350 |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
351 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
352 |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
353 ngx_inline static int ngx_handle_read_event(ngx_event_t *rev, int close) |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
354 { |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
355 if (ngx_event_flags & NGX_USE_CLEAR_EVENT) { |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
356 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
357 /* kqueue */ |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
358 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
359 if (!rev->active && !rev->ready) { |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
360 if (ngx_add_event(rev, NGX_READ_EVENT, NGX_CLEAR_EVENT) |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
361 == NGX_ERROR) { |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
362 return NGX_ERROR; |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
363 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
364 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
365 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
366 return NGX_OK; |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
367 |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
368 } else if (ngx_event_flags & NGX_USE_LEVEL_EVENT) { |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
369 |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
370 /* select, poll, /dev/poll */ |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
371 |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
372 if (!rev->active && !rev->ready) { |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
373 if (ngx_add_event(rev, NGX_READ_EVENT, NGX_LEVEL_EVENT) |
175
e92c2c647c57
nginx-0.0.1-2003-11-05-20:03:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
170
diff
changeset
|
374 == NGX_ERROR) |
e92c2c647c57
nginx-0.0.1-2003-11-05-20:03:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
170
diff
changeset
|
375 { |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
376 return NGX_ERROR; |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
377 } |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
378 |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
379 return NGX_OK; |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
380 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
381 |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
382 if (rev->active && (rev->ready || close)) { |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
383 if (ngx_del_event(rev, NGX_READ_EVENT, close ? NGX_CLOSE_EVENT : 0) |
175
e92c2c647c57
nginx-0.0.1-2003-11-05-20:03:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
170
diff
changeset
|
384 == NGX_ERROR) |
e92c2c647c57
nginx-0.0.1-2003-11-05-20:03:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
170
diff
changeset
|
385 { |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
386 return NGX_ERROR; |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
387 } |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
388 |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
389 return NGX_OK; |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
390 } |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
391 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
392 |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
393 /* aio, iocp, epoll, rt signals */ |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
394 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
395 return NGX_OK; |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
396 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
397 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
398 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
399 ngx_inline static int ngx_handle_level_read_event(ngx_event_t *rev) |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
400 { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
401 if (ngx_event_flags & NGX_USE_LEVEL_EVENT) { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
402 if (!rev->active && !rev->ready) { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
403 if (ngx_add_event(rev, NGX_READ_EVENT, NGX_LEVEL_EVENT) |
175
e92c2c647c57
nginx-0.0.1-2003-11-05-20:03:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
170
diff
changeset
|
404 == NGX_ERROR) |
e92c2c647c57
nginx-0.0.1-2003-11-05-20:03:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
170
diff
changeset
|
405 { |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
406 return NGX_ERROR; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
407 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
408 |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
409 return NGX_OK; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
410 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
411 |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
412 if (rev->active && rev->ready) { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
413 if (ngx_del_event(rev, NGX_READ_EVENT, 0) == NGX_ERROR) { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
414 return NGX_ERROR; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
415 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
416 |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
417 return NGX_OK; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
418 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
419 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
420 |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
421 return NGX_OK; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
422 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
423 |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
424 |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
425 ngx_inline static int ngx_handle_write_event(ngx_event_t *wev, int lowat) |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
426 { |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
427 if (ngx_event_flags & NGX_USE_CLEAR_EVENT) { |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
428 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
429 /* kqueue */ |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
430 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
431 #if (HAVE_LOWAT_EVENT) /* kqueue's NOTE_LOWAT */ |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
432 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
433 if (ngx_event_flags & NGX_HAVE_LOWAT_EVENT) { |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
434 wev->lowat = lowat; |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
435 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
436 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
437 #endif |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
438 if (!wev->active && !wev->ready) { |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
439 if (ngx_add_event(wev, NGX_WRITE_EVENT, NGX_CLEAR_EVENT) |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
440 == NGX_ERROR) { |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
441 return NGX_ERROR; |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
442 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
443 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
444 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
445 return NGX_OK; |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
446 |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
447 } else if (ngx_event_flags & NGX_USE_LEVEL_EVENT) { |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
448 |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
449 /* select, poll, /dev/poll */ |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
450 |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
451 if (!wev->active && !wev->ready) { |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
452 if (ngx_add_event(wev, NGX_WRITE_EVENT, NGX_LEVEL_EVENT) |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
453 == NGX_ERROR) { |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
454 return NGX_ERROR; |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
455 } |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
456 |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
457 return NGX_OK; |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
458 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
459 |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
460 if (wev->active && wev->ready) { |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
461 if (ngx_del_event(wev, NGX_WRITE_EVENT, 0) == NGX_ERROR) { |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
462 return NGX_ERROR; |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
463 } |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
464 |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
465 return NGX_OK; |
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
466 } |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
467 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
468 |
164
84036764e215
nginx-0.0.1-2003-10-29-11:30:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
163
diff
changeset
|
469 /* aio, iocp, epoll, rt signals */ |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
470 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
471 return NGX_OK; |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
472 } |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
473 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
474 |
144
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
475 ngx_inline static int ngx_handle_level_write_event(ngx_event_t *wev) |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
476 { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
477 if (ngx_event_flags & NGX_USE_LEVEL_EVENT) { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
478 if (!wev->active && !wev->ready) { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
479 if (ngx_add_event(wev, NGX_WRITE_EVENT, NGX_LEVEL_EVENT) |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
480 == NGX_ERROR) { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
481 return NGX_ERROR; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
482 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
483 |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
484 return NGX_OK; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
485 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
486 |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
487 if (wev->active && wev->ready) { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
488 if (ngx_del_event(wev, NGX_WRITE_EVENT, 0) == NGX_ERROR) { |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
489 return NGX_ERROR; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
490 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
491 |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
492 return NGX_OK; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
493 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
494 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
495 |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
496 return NGX_OK; |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
497 } |
ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
Igor Sysoev <igor@sysoev.ru>
parents:
143
diff
changeset
|
498 |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
139
diff
changeset
|
499 |
0
4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
500 #endif /* _NGX_EVENT_H_INCLUDED_ */ |