comparison src/event/ngx_event.c @ 39:83fa61cd3d2f

nginx-0.0.1-2002-12-24-20:30:59 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 24 Dec 2002 17:30:59 +0000
parents 2ffaa35fba42
children 0e81ac0bb3e2
comparison
equal deleted inserted replaced
38:2ffaa35fba42 39:83fa61cd3d2f
13 13
14 #include <ngx_select_module.h> 14 #include <ngx_select_module.h>
15 #if (HAVE_POLL) 15 #if (HAVE_POLL)
16 #include <ngx_poll_module.h> 16 #include <ngx_poll_module.h>
17 #endif 17 #endif
18 #if (HAVE_DEVPOLL)
19 #include <ngx_devpoll_module.h>
20 #endif
18 #if (HAVE_KQUEUE) 21 #if (HAVE_KQUEUE)
19 #include <ngx_kqueue_module.h> 22 #include <ngx_kqueue_module.h>
20 #endif 23 #endif
21 24
22 25
27 30
28 #if (HAVE_KQUEUE) 31 #if (HAVE_KQUEUE)
29 32
30 #if 0 33 #if 0
31 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT; 34 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT;
32 #elif 1 35 #elif 0
33 ngx_event_type_e ngx_event_type = NGX_POLL_EVENT; 36 ngx_event_type_e ngx_event_type = NGX_POLL_EVENT;
34 #else 37 #else
35 ngx_event_type_e ngx_event_type = NGX_KQUEUE_EVENT; 38 ngx_event_type_e ngx_event_type = NGX_KQUEUE_EVENT;
36 #endif 39 #endif
37 40
38 #elif (HAVE_POLL) 41 #elif (HAVE_DEVPOLL)
39 42
40 #if 0 43 #if 0
41 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT; 44 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT;
45 #elif 0
46 ngx_event_type_e ngx_event_type = NGX_POLL_EVENT;
42 #else 47 #else
43 ngx_event_type_e ngx_event_type = NGX_POLL_EVENT; 48 ngx_event_type_e ngx_event_type = NGX_DEVPOLL_EVENT;
44 #endif 49 #endif
45 50
46 #else 51 #else
47 52
48 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT; 53 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT;
54 /* ngx_event_type_e order */ 59 /* ngx_event_type_e order */
55 static int (*ngx_event_init[]) (int max_connections, ngx_log_t *log) = { 60 static int (*ngx_event_init[]) (int max_connections, ngx_log_t *log) = {
56 ngx_select_init, 61 ngx_select_init,
57 #if (HAVE_POLL) 62 #if (HAVE_POLL)
58 ngx_poll_init, 63 ngx_poll_init,
64 #endif
65 #if (HAVE_DEVPOLL)
66 ngx_devpoll_init,
59 #endif 67 #endif
60 #if (HAVE_KQUEUE) 68 #if (HAVE_KQUEUE)
61 ngx_kqueue_init 69 ngx_kqueue_init
62 #endif 70 #endif
63 }; 71 };