Mercurial > hg > nginx
comparison src/event/modules/ngx_select_module.c @ 356:2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 16 Jun 2004 15:32:11 +0000 |
parents | 0fb6c53fb135 |
children | 744ccb59062d |
comparison
equal
deleted
inserted
replaced
355:0fb6c53fb135 | 356:2e3cbc1bbe3c |
---|---|
8 #include <ngx_core.h> | 8 #include <ngx_core.h> |
9 #include <ngx_event.h> | 9 #include <ngx_event.h> |
10 | 10 |
11 | 11 |
12 | 12 |
13 static int ngx_select_init(ngx_cycle_t *cycle); | 13 static ngx_int_t ngx_select_init(ngx_cycle_t *cycle); |
14 static void ngx_select_done(ngx_cycle_t *cycle); | 14 static void ngx_select_done(ngx_cycle_t *cycle); |
15 static int ngx_select_add_event(ngx_event_t *ev, int event, u_int flags); | 15 static ngx_int_t ngx_select_add_event(ngx_event_t *ev, int event, u_int flags); |
16 static int ngx_select_del_event(ngx_event_t *ev, int event, u_int flags); | 16 static ngx_int_t ngx_select_del_event(ngx_event_t *ev, int event, u_int flags); |
17 static int ngx_select_process_events(ngx_cycle_t *cycle); | 17 static ngx_int_t ngx_select_process_events(ngx_cycle_t *cycle); |
18 | 18 |
19 static char *ngx_select_init_conf(ngx_cycle_t *cycle, void *conf); | 19 static char *ngx_select_init_conf(ngx_cycle_t *cycle, void *conf); |
20 | 20 |
21 | 21 |
22 static fd_set master_read_fd_set; | 22 static fd_set master_read_fd_set; |
70 NULL, /* init module */ | 70 NULL, /* init module */ |
71 NULL /* init child */ | 71 NULL /* init child */ |
72 }; | 72 }; |
73 | 73 |
74 | 74 |
75 static int ngx_select_init(ngx_cycle_t *cycle) | 75 static ngx_int_t ngx_select_init(ngx_cycle_t *cycle) |
76 { | 76 { |
77 ngx_event_t **index; | 77 ngx_event_t **index; |
78 | 78 |
79 if (event_index == NULL) { | 79 if (event_index == NULL) { |
80 FD_ZERO(&master_read_fd_set); | 80 FD_ZERO(&master_read_fd_set); |
133 | 133 |
134 event_index = NULL; | 134 event_index = NULL; |
135 } | 135 } |
136 | 136 |
137 | 137 |
138 static int ngx_select_add_event(ngx_event_t *ev, int event, u_int flags) | 138 static ngx_int_t ngx_select_add_event(ngx_event_t *ev, int event, u_int flags) |
139 { | 139 { |
140 ngx_connection_t *c; | 140 ngx_connection_t *c; |
141 | 141 |
142 c = ev->data; | 142 c = ev->data; |
143 | 143 |
194 | 194 |
195 return NGX_OK; | 195 return NGX_OK; |
196 } | 196 } |
197 | 197 |
198 | 198 |
199 static int ngx_select_del_event(ngx_event_t *ev, int event, u_int flags) | 199 static ngx_int_t ngx_select_del_event(ngx_event_t *ev, int event, u_int flags) |
200 { | 200 { |
201 ngx_connection_t *c; | 201 ngx_connection_t *c; |
202 | 202 |
203 c = ev->data; | 203 c = ev->data; |
204 | 204 |
247 | 247 |
248 return NGX_OK; | 248 return NGX_OK; |
249 } | 249 } |
250 | 250 |
251 | 251 |
252 static int ngx_select_process_events(ngx_cycle_t *cycle) | 252 static ngx_int_t ngx_select_process_events(ngx_cycle_t *cycle) |
253 { | 253 { |
254 int ready, nready; | 254 int ready, nready; |
255 ngx_uint_t i, found, lock, expire; | 255 ngx_uint_t i, found, lock, expire; |
256 ngx_err_t err; | 256 ngx_err_t err; |
257 ngx_msec_t timer; | 257 ngx_msec_t timer; |