Mercurial > hg > nginx
diff src/event/ngx_event.c @ 435:5cdc4838d4e8
nginx-0.0.11-2004-09-22-20:18:21 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 22 Sep 2004 16:18:21 +0000 |
parents | 3f88935a02e8 |
children | da8c5707af39 |
line wrap: on
line diff
--- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -45,6 +45,7 @@ static char *ngx_event_debug_connection( static void *ngx_event_create_conf(ngx_cycle_t *cycle); static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf); +static char *ngx_accept_mutex_check(ngx_conf_t *cf, void *post, void *data); static ngx_uint_t ngx_event_max_module; @@ -113,6 +114,9 @@ ngx_module_t ngx_events_module = { static ngx_str_t event_core_name = ngx_string("event_core"); +static ngx_conf_post_t ngx_accept_mutex_post = { ngx_accept_mutex_check } ; + + static ngx_command_t ngx_event_core_commands[] = { { ngx_string("connections"), @@ -141,7 +145,7 @@ static ngx_command_t ngx_event_core_com ngx_conf_set_flag_slot, 0, offsetof(ngx_event_conf_t, accept_mutex), - NULL }, + &ngx_accept_mutex_post }, { ngx_string("accept_mutex_delay"), NGX_EVENT_CONF|NGX_CONF_TAKE1, @@ -777,3 +781,20 @@ static char *ngx_event_init_conf(ngx_cyc return NGX_CONF_OK; } + + +static char *ngx_accept_mutex_check(ngx_conf_t *cf, void *post, void *data) +{ +#if !(NGX_HAVE_ATOMIC_OPS) + + ngx_flag_t *fp = data; + + *fp = 0; + + ngx_conf_log_error(NGX_LOG_WARN, cf, 0, + "\"accept_mutex\" is not supported, ignored"); + +#endif + + return NGX_CONF_OK; +}