Mercurial > hg > nginx
comparison src/event/modules/ngx_kqueue_module.c @ 50:b288069a8696
nginx-0.0.1-2003-01-23-21:47:54 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 23 Jan 2003 18:47:54 +0000 |
parents | 83fa61cd3d2f |
children | a6afbb8a2ada |
comparison
equal
deleted
inserted
replaced
49:c091d5b853c8 | 50:b288069a8696 |
---|---|
7 #include <ngx_core.h> | 7 #include <ngx_core.h> |
8 #include <ngx_types.h> | 8 #include <ngx_types.h> |
9 #include <ngx_log.h> | 9 #include <ngx_log.h> |
10 #include <ngx_connection.h> | 10 #include <ngx_connection.h> |
11 #include <ngx_event.h> | 11 #include <ngx_event.h> |
12 #include <ngx_event_timer.h> | |
12 #include <ngx_kqueue_module.h> | 13 #include <ngx_kqueue_module.h> |
13 | 14 |
14 #if (USE_KQUEUE) && !(HAVE_KQUEUE) | 15 #if (USE_KQUEUE) && !(HAVE_KQUEUE) |
15 #error "kqueue is not supported on this platform" | 16 #error "kqueue is not supported on this platform" |
16 #endif | 17 #endif |
48 } | 49 } |
49 | 50 |
50 ngx_test_null(change_list, ngx_alloc(change_size, log), NGX_ERROR); | 51 ngx_test_null(change_list, ngx_alloc(change_size, log), NGX_ERROR); |
51 ngx_test_null(event_list, ngx_alloc(event_size, log), NGX_ERROR); | 52 ngx_test_null(event_list, ngx_alloc(event_size, log), NGX_ERROR); |
52 | 53 |
54 if (ngx_event_init_timer(log) == NGX_ERROR) { | |
55 return NGX_ERROR; | |
56 } | |
57 | |
58 #if 0 | |
53 timer_queue.timer_prev = &timer_queue; | 59 timer_queue.timer_prev = &timer_queue; |
54 timer_queue.timer_next = &timer_queue; | 60 timer_queue.timer_next = &timer_queue; |
61 #endif | |
55 | 62 |
56 #if !(USE_KQUEUE) | 63 #if !(USE_KQUEUE) |
57 ngx_event_actions.add = ngx_kqueue_add_event; | 64 ngx_event_actions.add = ngx_kqueue_add_event; |
58 ngx_event_actions.del = ngx_kqueue_del_event; | 65 ngx_event_actions.del = ngx_kqueue_del_event; |
59 ngx_event_actions.timer = ngx_kqueue_add_timer; | 66 ngx_event_actions.timer = ngx_kqueue_add_timer; |