Mercurial > hg > nginx-quic
comparison src/event/modules/ngx_kqueue_module.c @ 102:7e86d028d8f0
nginx-0.0.1-2003-06-06-18:59:20 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 06 Jun 2003 14:59:20 +0000 |
parents | a23d010f356d |
children | 00bee6e7b485 |
comparison
equal
deleted
inserted
replaced
101:2e069b6e6920 | 102:7e86d028d8f0 |
---|---|
4 */ | 4 */ |
5 | 5 |
6 | 6 |
7 #include <ngx_config.h> | 7 #include <ngx_config.h> |
8 #include <ngx_core.h> | 8 #include <ngx_core.h> |
9 #include <ngx_connection.h> | |
10 #include <ngx_event.h> | 9 #include <ngx_event.h> |
11 #include <ngx_kqueue_module.h> | 10 #include <ngx_kqueue_module.h> |
11 | |
12 | |
13 typedef struct { | |
14 int changes; | |
15 int events; | |
16 } ngx_kqueue_conf_t; | |
12 | 17 |
13 | 18 |
14 static int ngx_kqueue_init(ngx_log_t *log); | 19 static int ngx_kqueue_init(ngx_log_t *log); |
15 static void ngx_kqueue_done(ngx_log_t *log); | 20 static void ngx_kqueue_done(ngx_log_t *log); |
16 static int ngx_kqueue_add_event(ngx_event_t *ev, int event, u_int flags); | 21 static int ngx_kqueue_add_event(ngx_event_t *ev, int event, u_int flags); |
208 ngx_connection_t *c; | 213 ngx_connection_t *c; |
209 | 214 |
210 c = ev->data; | 215 c = ev->data; |
211 | 216 |
212 #if (NGX_DEBUG_EVENT) | 217 #if (NGX_DEBUG_EVENT) |
213 ngx_log_debug(ev->log, "kqueue set event: %d: ft:%d f:%08x" _ | 218 ngx_log_debug(ev->log, "kqueue set event: %d: ft:%d fl:%08x" _ |
214 c->fd _ filter _ flags); | 219 c->fd _ filter _ flags); |
215 #endif | 220 #endif |
216 | 221 |
217 if (nchanges >= max_changes) { | 222 if (nchanges >= max_changes) { |
218 ngx_log_error(NGX_LOG_WARN, ev->log, 0, | 223 ngx_log_error(NGX_LOG_WARN, ev->log, 0, |
320 for (i = 0; i < events; i++) { | 325 for (i = 0; i < events; i++) { |
321 | 326 |
322 #if (NGX_DEBUG_EVENT) | 327 #if (NGX_DEBUG_EVENT) |
323 if (event_list[i].ident > 0x8000000) { | 328 if (event_list[i].ident > 0x8000000) { |
324 ngx_log_debug(log, | 329 ngx_log_debug(log, |
325 "kevent: %08x: ft:%d f:%08x ff:%08x d:%d ud:%08x" _ | 330 "kevent: %08x: ft:%d fl:%08x ff:%08x d:%d ud:%08x" _ |
326 event_list[i].ident _ event_list[i].filter _ | 331 event_list[i].ident _ event_list[i].filter _ |
327 event_list[i].flags _ event_list[i].fflags _ | 332 event_list[i].flags _ event_list[i].fflags _ |
328 event_list[i].data _ event_list[i].udata); | 333 event_list[i].data _ event_list[i].udata); |
329 } else { | 334 } else { |
330 ngx_log_debug(log, | 335 ngx_log_debug(log, |
331 "kevent: %d: ft:%d f:%08x ff:%08x d:%d ud:%08x" _ | 336 "kevent: %d: ft:%d fl:%08x ff:%08x d:%d ud:%08x" _ |
332 event_list[i].ident _ event_list[i].filter _ | 337 event_list[i].ident _ event_list[i].filter _ |
333 event_list[i].flags _ event_list[i].fflags _ | 338 event_list[i].flags _ event_list[i].fflags _ |
334 event_list[i].data _ event_list[i].udata); | 339 event_list[i].data _ event_list[i].udata); |
335 } | 340 } |
336 #endif | 341 #endif |