Mercurial > hg > nginx
comparison src/event/ngx_event_posted.c @ 563:9c2f3ed7a247 release-0.3.3
nginx-0.3.3-RELEASE import
*) Change: the "bl" and "af" parameters of the "listen" directive was
renamed to the "backlog" and "accept_filter".
*) Feature: the "rcvbuf" and "sndbuf" parameters of the "listen"
directive.
*) Change: the "$msec" log parameter does not require now the
additional the gettimeofday() system call.
*) Feature: the -t switch now tests the "listen" directives.
*) Bugfix: if the invalid address was specified in the "listen"
directive, then after the -HUP signal nginx left an open socket in
the CLOSED state.
*) Bugfix: the mime type may be incorrectly set to default value for
index file with variable in the name; the bug had appeared in 0.3.0.
*) Feature: the "timer_resolution" directive.
*) Feature: the millisecond "$upstream_response_time" log parameter.
*) Bugfix: a temporary file with client request body now is removed
just after the response header was transferred to a client.
*) Bugfix: OpenSSL 0.9.6 compatibility.
*) Bugfix: the SSL certificate and key file paths could not be relative.
*) Bugfix: the "ssl_prefer_server_ciphers" directive did not work in
the ngx_imap_ssl_module.
*) Bugfix: the "ssl_protocols" directive allowed to specify the single
protocol only.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 19 Oct 2005 12:33:58 +0000 |
parents | 9b8c906f6e63 |
children | d620f497c50f |
comparison
equal
deleted
inserted
replaced
562:4b6108f69026 | 563:9c2f3ed7a247 |
---|---|
7 #include <ngx_config.h> | 7 #include <ngx_config.h> |
8 #include <ngx_core.h> | 8 #include <ngx_core.h> |
9 #include <ngx_event.h> | 9 #include <ngx_event.h> |
10 | 10 |
11 | 11 |
12 ngx_thread_volatile ngx_event_t *ngx_posted_accept_events; | |
12 ngx_thread_volatile ngx_event_t *ngx_posted_events; | 13 ngx_thread_volatile ngx_event_t *ngx_posted_events; |
13 | 14 |
14 #if (NGX_THREADS) | 15 #if (NGX_THREADS) |
15 ngx_mutex_t *ngx_posted_events_mutex; | 16 ngx_mutex_t *ngx_posted_events_mutex; |
16 #endif | 17 #endif |
17 | 18 |
18 | 19 |
19 void ngx_event_process_posted(ngx_cycle_t *cycle) | 20 void |
21 ngx_event_process_posted(ngx_cycle_t *cycle, | |
22 ngx_thread_volatile ngx_event_t **posted) | |
20 { | 23 { |
21 ngx_event_t *ev; | 24 ngx_event_t *ev; |
22 | 25 |
23 for ( ;; ) { | 26 for ( ;; ) { |
24 | 27 |
25 ev = (ngx_event_t *) ngx_posted_events; | 28 ev = (ngx_event_t *) *posted; |
26 | 29 |
27 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, | 30 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, |
28 "posted event %p", ev); | 31 "posted event %p", ev); |
29 | 32 |
30 if (ev == NULL) { | 33 if (ev == NULL) { |
38 } | 41 } |
39 | 42 |
40 | 43 |
41 #if (NGX_THREADS) && !(NGX_WIN32) | 44 #if (NGX_THREADS) && !(NGX_WIN32) |
42 | 45 |
43 void ngx_wakeup_worker_thread(ngx_cycle_t *cycle) | 46 void |
47 ngx_wakeup_worker_thread(ngx_cycle_t *cycle) | |
44 { | 48 { |
45 ngx_int_t i; | 49 ngx_int_t i; |
46 #if 0 | 50 #if 0 |
47 ngx_uint_t busy; | 51 ngx_uint_t busy; |
48 ngx_event_t *ev; | 52 ngx_event_t *ev; |
74 } | 78 } |
75 } | 79 } |
76 } | 80 } |
77 | 81 |
78 | 82 |
79 ngx_int_t ngx_event_thread_process_posted(ngx_cycle_t *cycle) | 83 ngx_int_t |
84 ngx_event_thread_process_posted(ngx_cycle_t *cycle) | |
80 { | 85 { |
81 ngx_event_t *ev; | 86 ngx_event_t *ev; |
82 | 87 |
83 for ( ;; ) { | 88 for ( ;; ) { |
84 | 89 |
137 | 142 |
138 ngx_mutex_unlock(ngx_posted_events_mutex); | 143 ngx_mutex_unlock(ngx_posted_events_mutex); |
139 | 144 |
140 ev->handler(ev); | 145 ev->handler(ev); |
141 | 146 |
142 if (ngx_mutex_lock(ngx_posted_events_mutex) == NGX_ERROR) { | 147 ngx_mutex_lock(ngx_posted_events_mutex); |
143 return NGX_ERROR; | |
144 } | |
145 | 148 |
146 if (ev->locked) { | 149 if (ev->locked) { |
147 ngx_unlock(ev->lock); | 150 ngx_unlock(ev->lock); |
148 | 151 |
149 if (ev->lock != ev->own_lock) { | 152 if (ev->lock != ev->own_lock) { |
159 } | 162 } |
160 } | 163 } |
161 | 164 |
162 #else | 165 #else |
163 | 166 |
164 void ngx_wakeup_worker_thread(ngx_cycle_t *cycle) | 167 void |
168 ngx_wakeup_worker_thread(ngx_cycle_t *cycle) | |
165 { | 169 { |
166 } | 170 } |
167 | 171 |
168 #endif | 172 #endif |