comparison 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
comparison
equal deleted inserted replaced
434:8998b09f89e9 435:5cdc4838d4e8
43 static char *ngx_event_debug_connection(ngx_conf_t *cf, ngx_command_t *cmd, 43 static char *ngx_event_debug_connection(ngx_conf_t *cf, ngx_command_t *cmd,
44 void *conf); 44 void *conf);
45 45
46 static void *ngx_event_create_conf(ngx_cycle_t *cycle); 46 static void *ngx_event_create_conf(ngx_cycle_t *cycle);
47 static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf); 47 static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf);
48 static char *ngx_accept_mutex_check(ngx_conf_t *cf, void *post, void *data);
48 49
49 50
50 static ngx_uint_t ngx_event_max_module; 51 static ngx_uint_t ngx_event_max_module;
51 52
52 ngx_uint_t ngx_event_flags; 53 ngx_uint_t ngx_event_flags;
111 }; 112 };
112 113
113 114
114 static ngx_str_t event_core_name = ngx_string("event_core"); 115 static ngx_str_t event_core_name = ngx_string("event_core");
115 116
117 static ngx_conf_post_t ngx_accept_mutex_post = { ngx_accept_mutex_check } ;
118
119
116 static ngx_command_t ngx_event_core_commands[] = { 120 static ngx_command_t ngx_event_core_commands[] = {
117 121
118 { ngx_string("connections"), 122 { ngx_string("connections"),
119 NGX_EVENT_CONF|NGX_CONF_TAKE1, 123 NGX_EVENT_CONF|NGX_CONF_TAKE1,
120 ngx_event_connections, 124 ngx_event_connections,
139 { ngx_string("accept_mutex"), 143 { ngx_string("accept_mutex"),
140 NGX_EVENT_CONF|NGX_CONF_TAKE1, 144 NGX_EVENT_CONF|NGX_CONF_TAKE1,
141 ngx_conf_set_flag_slot, 145 ngx_conf_set_flag_slot,
142 0, 146 0,
143 offsetof(ngx_event_conf_t, accept_mutex), 147 offsetof(ngx_event_conf_t, accept_mutex),
144 NULL }, 148 &ngx_accept_mutex_post },
145 149
146 { ngx_string("accept_mutex_delay"), 150 { ngx_string("accept_mutex_delay"),
147 NGX_EVENT_CONF|NGX_CONF_TAKE1, 151 NGX_EVENT_CONF|NGX_CONF_TAKE1,
148 ngx_conf_set_msec_slot, 152 ngx_conf_set_msec_slot,
149 0, 153 0,
775 } 779 }
776 #endif 780 #endif
777 781
778 return NGX_CONF_OK; 782 return NGX_CONF_OK;
779 } 783 }
784
785
786 static char *ngx_accept_mutex_check(ngx_conf_t *cf, void *post, void *data)
787 {
788 #if !(NGX_HAVE_ATOMIC_OPS)
789
790 ngx_flag_t *fp = data;
791
792 *fp = 0;
793
794 ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
795 "\"accept_mutex\" is not supported, ignored");
796
797 #endif
798
799 return NGX_CONF_OK;
800 }