comparison src/event/ngx_event.c @ 60:50186b49f2ad

nginx-0.0.1-2003-02-11-10:14:40 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 11 Feb 2003 07:14:40 +0000
parents e8cdc2989cee
children 36d2c25cc9bb
comparison
equal deleted inserted replaced
59:e8cdc2989cee 60:50186b49f2ad
34 ngx_connection_t *ngx_connections; 34 ngx_connection_t *ngx_connections;
35 ngx_event_t *ngx_read_events, *ngx_write_events; 35 ngx_event_t *ngx_read_events, *ngx_write_events;
36 36
37 #if !(USE_KQUEUE) 37 #if !(USE_KQUEUE)
38 38
39 #if (HAVE_KQUEUE) 39 ngx_event_type_e ngx_event_type;
40 40
41 #if 0 41 int ngx_event_flags;
42 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT;
43 #elif 0
44 ngx_event_type_e ngx_event_type = NGX_POLL_EVENT;
45 #else
46 ngx_event_type_e ngx_event_type = NGX_KQUEUE_EVENT;
47 #endif
48
49 #elif (HAVE_DEVPOLL)
50
51 #if 0
52 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT;
53 #elif 0
54 ngx_event_type_e ngx_event_type = NGX_POLL_EVENT;
55 #else
56 ngx_event_type_e ngx_event_type = NGX_DEVPOLL_EVENT;
57 #endif
58
59 #else
60
61 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT;
62
63 #endif
64
65 int ngx_event_flags;
66 42
67 ngx_event_actions_t ngx_event_actions; 43 ngx_event_actions_t ngx_event_actions;
68 44
69 /* ngx_event_type_e order */ 45 /* ngx_event_type_e order */
70 static int (*ngx_event_init[]) (int max_connections, ngx_log_t *log) = { 46 static int (*ngx_event_init[]) (int max_connections, ngx_log_t *log) = {
95 ngx_connection_t *c; 71 ngx_connection_t *c;
96 72
97 /* STUB */ 73 /* STUB */
98 int max_connections = 512; 74 int max_connections = 512;
99 75
100 #if (HAVE_IOCP) 76 #if 0
101 ngx_event_type = NGX_IOCP_EVENT; 77 ngx_event_type = NGX_POLL_EVENT_N;
78 #endif
79 #if 1
80 ngx_event_type = NGX_KQUEUE_EVENT_N;
81 #endif
82 #if 0
83 ngx_event_type = NGX_DEVPOLL_EVENT_N;
84 #endif
85 #if 0
86 ngx_event_type = NGX_IOCP_EVENT_N;
102 #endif 87 #endif
103 88
104 if (ngx_init_events(max_connections, log) == NGX_ERROR) { 89 if (ngx_init_events(max_connections, log) == NGX_ERROR) {
105 exit(1); 90 exit(1);
106 } 91 }