comparison src/event/ngx_event.c @ 330:377a955421dc

nginx-0.0.3-2004-04-29-20:34:26 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 29 Apr 2004 16:34:26 +0000
parents 7c3323909107
children f168a88e93f7
comparison
equal deleted inserted replaced
329:9a0ffa21f193 330:377a955421dc
188 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, 188 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
189 "mmap(MAP_ANON|MAP_SHARED) failed"); 189 "mmap(MAP_ANON|MAP_SHARED) failed");
190 return NGX_ERROR; 190 return NGX_ERROR;
191 } 191 }
192 192
193 if (ecf->accept_mutex) { 193 ngx_accept_mutex_ptr = (ngx_atomic_t *) shared;
194 ngx_accept_mutex_ptr = (ngx_atomic_t *) shared;
195 }
196
197 ngx_connection_counter = (ngx_atomic_t *) (shared + 128); 194 ngx_connection_counter = (ngx_atomic_t *) (shared + 128);
198 195
199 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0, 196 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
200 "counter: " PTR_FMT ", %d", 197 "counter: " PTR_FMT ", %d",
201 ngx_connection_counter, *ngx_connection_counter); 198 ngx_connection_counter, *ngx_connection_counter);
218 ngx_event_module_t *module; 215 ngx_event_module_t *module;
219 #if (WIN32) 216 #if (WIN32)
220 ngx_iocp_conf_t *iocpcf; 217 ngx_iocp_conf_t *iocpcf;
221 #endif 218 #endif
222 219
223
224 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); 220 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
225 ecf = ngx_event_get_conf(cycle->conf_ctx, ngx_event_core_module); 221 ecf = ngx_event_get_conf(cycle->conf_ctx, ngx_event_core_module);
226 222
227 if (ccf->worker_processes > 1 && ngx_accept_mutex_ptr) { 223 if (ccf->worker_processes > 1 && ecf->accept_mutex) {
228 ngx_accept_mutex = ngx_accept_mutex_ptr; 224 ngx_accept_mutex = ngx_accept_mutex_ptr;
229 ngx_accept_mutex_held = 1; 225 ngx_accept_mutex_held = 1;
230 ngx_accept_mutex_delay = ecf->accept_mutex_delay; 226 ngx_accept_mutex_delay = ecf->accept_mutex_delay;
231 } 227 }
232 228