comparison src/event/modules/ngx_poll_module.c @ 665:0b460e61bdcd default tip

Merge with nginx 1.0.0.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 25 Apr 2011 04:22:17 +0400
parents be4f34123024
children
comparison
equal deleted inserted replaced
572:06419a2298a9 665:0b460e61bdcd
70 70
71 if (event_list == NULL) { 71 if (event_list == NULL) {
72 nevents = 0; 72 nevents = 0;
73 } 73 }
74 74
75 if (ngx_process == NGX_PROCESS_WORKER 75 if (ngx_process >= NGX_PROCESS_WORKER
76 || cycle->old_cycle == NULL 76 || cycle->old_cycle == NULL
77 || cycle->old_cycle->connection_n < cycle->connection_n) 77 || cycle->old_cycle->connection_n < cycle->connection_n)
78 { 78 {
79 list = ngx_alloc(sizeof(struct pollfd) * cycle->connection_n, 79 list = ngx_alloc(sizeof(struct pollfd) * cycle->connection_n,
80 cycle->log); 80 cycle->log);
260 260
261 ready = poll(event_list, (u_int) nevents, (int) timer); 261 ready = poll(event_list, (u_int) nevents, (int) timer);
262 262
263 err = (ready == -1) ? ngx_errno : 0; 263 err = (ready == -1) ? ngx_errno : 0;
264 264
265 if (flags & NGX_UPDATE_TIME) { 265 if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) {
266 ngx_time_update(0, 0); 266 ngx_time_update();
267 } 267 }
268 268
269 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0, 269 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
270 "poll ready %d of %d", ready, nevents); 270 "poll ready %d of %d", ready, nevents);
271 271