Mercurial > hg > nginx
comparison src/event/ngx_event.c @ 354:eaf1f651cf86
nginx-0.0.7-2004-06-15-11:55:11 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 15 Jun 2004 07:55:11 +0000 |
parents | 694d7ddc3599 |
children | 0fb6c53fb135 |
comparison
equal
deleted
inserted
replaced
353:b8d3d7dbfcc8 | 354:eaf1f651cf86 |
---|---|
626 } | 626 } |
627 | 627 |
628 | 628 |
629 static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf) | 629 static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf) |
630 { | 630 { |
631 ngx_event_conf_t *ecf = conf; | 631 ngx_event_conf_t *ecf = conf; |
632 | 632 |
633 #if (HAVE_KQUEUE) | 633 #if (HAVE_KQUEUE) |
634 | 634 |
635 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); | 635 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); |
636 ngx_conf_init_value(ecf->use, ngx_kqueue_module.ctx_index); | 636 ngx_conf_init_value(ecf->use, ngx_kqueue_module.ctx_index); |
648 ngx_conf_init_value(ecf->use, ngx_epoll_module.ctx_index); | 648 ngx_conf_init_value(ecf->use, ngx_epoll_module.ctx_index); |
649 ngx_conf_init_ptr_value(ecf->name, ngx_epoll_module_ctx.name->data); | 649 ngx_conf_init_ptr_value(ecf->name, ngx_epoll_module_ctx.name->data); |
650 | 650 |
651 #elif (HAVE_RTSIG) | 651 #elif (HAVE_RTSIG) |
652 | 652 |
653 ngx_core_conf_t *ccf; | |
654 | |
653 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); | 655 ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); |
654 ngx_conf_init_value(ecf->use, ngx_rtsig_module.ctx_index); | 656 ngx_conf_init_value(ecf->use, ngx_rtsig_module.ctx_index); |
655 ngx_conf_init_ptr_value(ecf->name, ngx_rtsig_module_ctx.name->data); | 657 ngx_conf_init_ptr_value(ecf->name, ngx_rtsig_module_ctx.name->data); |
656 | 658 |
657 #elif (HAVE_SELECT) | 659 #elif (HAVE_SELECT) |
699 | 701 |
700 ngx_conf_init_value(ecf->multi_accept, 0); | 702 ngx_conf_init_value(ecf->multi_accept, 0); |
701 ngx_conf_init_value(ecf->accept_mutex, 1); | 703 ngx_conf_init_value(ecf->accept_mutex, 1); |
702 ngx_conf_init_msec_value(ecf->accept_mutex_delay, 500); | 704 ngx_conf_init_msec_value(ecf->accept_mutex_delay, 500); |
703 | 705 |
706 #if (HAVE_RTSIG) | |
707 if (ecf->use == ngx_rtsig_module.ctx_index && ecf->accept_mutex == 0) { | |
708 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, | |
709 ngx_core_module); | |
710 if (ccf->worker_processes) { | |
711 ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, | |
712 "the \"rtsig\" method requires " | |
713 "\"accept_mutex\" to be on"); | |
714 return NGX_CONF_ERROR; | |
715 } | |
716 } | |
717 #endif | |
718 | |
704 return NGX_CONF_OK; | 719 return NGX_CONF_OK; |
705 } | 720 } |