Mercurial > hg > nginx-vendor-0-5
diff src/http/ngx_http_request.c @ 110:dad2fe8ecf08 NGINX_0_3_2
nginx 0.3.2
*) Feature: the Sun Studio 10 C compiler support.
*) Feature: the "proxy_upstream_max_fails",
"proxy_upstream_fail_timeout", "fastcgi_upstream_max_fails", and
"fastcgi_upstream_fail_timeout" directives.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 12 Oct 2005 00:00:00 +0400 |
parents | 45f7329b4bd0 |
children | 408f195b3482 |
line wrap: on
line diff
--- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -174,13 +174,13 @@ ngx_http_init_connection(ngx_connection_ ngx_mutex_unlock(ngx_posted_events_mutex); #if (NGX_STAT_STUB) - ngx_atomic_inc(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, 1); #endif return; } #if (NGX_STAT_STUB) - ngx_atomic_inc(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, 1); #endif ngx_http_init_request(rev); @@ -195,7 +195,7 @@ ngx_http_init_connection(ngx_connection_ } #if (NGX_STAT_STUB) - ngx_atomic_inc(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, 1); #endif } @@ -226,7 +226,7 @@ void ngx_http_init_request(ngx_event_t * ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, "client timed out"); #if (NGX_STAT_STUB) - ngx_atomic_dec(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, -1); #endif ngx_http_close_connection(c); @@ -238,7 +238,7 @@ void ngx_http_init_request(ngx_event_t * if (hc) { #if (NGX_STAT_STUB) - ngx_atomic_inc(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, 1); #endif } else { @@ -246,7 +246,7 @@ void ngx_http_init_request(ngx_event_t * if (hc == NULL) { #if (NGX_STAT_STUB) - ngx_atomic_dec(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, -1); #endif ngx_http_close_connection(c); @@ -270,7 +270,7 @@ void ngx_http_init_request(ngx_event_t * if (r == NULL) { #if (NGX_STAT_STUB) - ngx_atomic_dec(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, -1); #endif ngx_http_close_connection(c); @@ -281,7 +281,7 @@ void ngx_http_init_request(ngx_event_t * } #if (NGX_STAT_STUB) - ngx_atomic_dec(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, -1); #endif c->data = r; @@ -439,9 +439,9 @@ void ngx_http_init_request(ngx_event_t * r->log_handler = ngx_http_log_error_handler; #if (NGX_STAT_STUB) - ngx_atomic_inc(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, 1); r->stat_reading = 1; - ngx_atomic_inc(ngx_stat_requests); + ngx_atomic_fetch_add(ngx_stat_requests, 1); #endif rev->handler(rev); @@ -669,9 +669,9 @@ ngx_http_process_request_line(ngx_event_ } #if (NGX_STAT_STUB) - ngx_atomic_dec(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, -1); r->stat_reading = 0; - ngx_atomic_inc(ngx_stat_writing); + ngx_atomic_fetch_add(ngx_stat_writing, 1); r->stat_writing = 1; #endif @@ -899,9 +899,9 @@ ngx_http_process_request_headers(ngx_eve } #if (NGX_STAT_STUB) - ngx_atomic_dec(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, -1); r->stat_reading = 0; - ngx_atomic_inc(ngx_stat_writing); + ngx_atomic_fetch_add(ngx_stat_writing, 1); r->stat_writing = 1; #endif @@ -2396,11 +2396,11 @@ ngx_http_close_request(ngx_http_request_ #if (NGX_STAT_STUB) if (r->stat_reading) { - ngx_atomic_dec(ngx_stat_reading); + ngx_atomic_fetch_add(ngx_stat_reading, -1); } if (r->stat_writing) { - ngx_atomic_dec(ngx_stat_writing); + ngx_atomic_fetch_add(ngx_stat_writing, -1); } #endif @@ -2457,7 +2457,7 @@ ngx_http_close_connection(ngx_connection #endif #if (NGX_STAT_STUB) - ngx_atomic_dec(ngx_stat_active); + ngx_atomic_fetch_add(ngx_stat_active, -1); #endif pool = c->pool;