Mercurial > hg > nginx-quic
comparison src/event/ngx_event.c @ 360:239e37d44a34
nginx-0.0.7-2004-06-18-20:22:16 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 18 Jun 2004 16:22:16 +0000 |
parents | 0a03c921c81d |
children | ceec87d1c2b3 |
comparison
equal
deleted
inserted
replaced
359:a3e622ab7ee7 | 360:239e37d44a34 |
---|---|
184 | 184 |
185 /* TODO: 128 is cache line size */ | 185 /* TODO: 128 is cache line size */ |
186 | 186 |
187 size = 128 /* ngx_accept_mutex */ | 187 size = 128 /* ngx_accept_mutex */ |
188 + 128; /* ngx_connection_counter */ | 188 + 128; /* ngx_connection_counter */ |
189 | |
190 #if 0 | |
191 shared = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0); | |
192 | |
193 if (shared == MAP_FAILED) { | |
194 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, | |
195 "mmap(MAP_ANON|MAP_SHARED) failed"); | |
196 return NGX_ERROR; | |
197 } | |
198 #endif | |
199 | 189 |
200 if (!(shared = ngx_create_shared_memory(size, cycle->log))) { | 190 if (!(shared = ngx_create_shared_memory(size, cycle->log))) { |
201 return NGX_ERROR; | 191 return NGX_ERROR; |
202 } | 192 } |
203 | 193 |
633 | 623 |
634 | 624 |
635 static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf) | 625 static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf) |
636 { | 626 { |
637 ngx_event_conf_t *ecf = conf; | 627 ngx_event_conf_t *ecf = conf; |
628 #if (HAVE_RTSIG) | |
629 ngx_core_conf_t *ccf; | |
630 #endif | |
638 | 631 |
639 #if (HAVE_KQUEUE) | 632 #if (HAVE_KQUEUE) |
640 | 633 |
641 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); | 634 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); |
642 ngx_conf_init_unsigned_value(ecf->use, ngx_kqueue_module.ctx_index); | 635 ngx_conf_init_unsigned_value(ecf->use, ngx_kqueue_module.ctx_index); |
653 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); | 646 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); |
654 ngx_conf_init_unsigned_value(ecf->use, ngx_epoll_module.ctx_index); | 647 ngx_conf_init_unsigned_value(ecf->use, ngx_epoll_module.ctx_index); |
655 ngx_conf_init_ptr_value(ecf->name, ngx_epoll_module_ctx.name->data); | 648 ngx_conf_init_ptr_value(ecf->name, ngx_epoll_module_ctx.name->data); |
656 | 649 |
657 #elif (HAVE_RTSIG) | 650 #elif (HAVE_RTSIG) |
658 | |
659 ngx_core_conf_t *ccf; | |
660 | 651 |
661 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); | 652 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); |
662 ngx_conf_init_unsigned_value(ecf->use, ngx_rtsig_module.ctx_index); | 653 ngx_conf_init_unsigned_value(ecf->use, ngx_rtsig_module.ctx_index); |
663 ngx_conf_init_ptr_value(ecf->name, ngx_rtsig_module_ctx.name->data); | 654 ngx_conf_init_ptr_value(ecf->name, ngx_rtsig_module_ctx.name->data); |
664 | 655 |