comparison src/event/ngx_event.h @ 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 c1f965ef9718
children 58475592100c
comparison
equal deleted inserted replaced
562:4b6108f69026 563:9c2f3ed7a247
132 132
133 ngx_rbtree_node_t timer; 133 ngx_rbtree_node_t timer;
134 134
135 unsigned closed:1; 135 unsigned closed:1;
136 136
137 /* to test on worker exit */
138 unsigned channel:1;
139
137 #if (NGX_THREADS) 140 #if (NGX_THREADS)
138 141
139 unsigned locked:1; 142 unsigned locked:1;
140 143
141 unsigned posted_ready:1; 144 unsigned posted_ready:1;
194 197
195 ngx_int_t (*add_conn)(ngx_connection_t *c); 198 ngx_int_t (*add_conn)(ngx_connection_t *c);
196 ngx_int_t (*del_conn)(ngx_connection_t *c, u_int flags); 199 ngx_int_t (*del_conn)(ngx_connection_t *c, u_int flags);
197 200
198 ngx_int_t (*process_changes)(ngx_cycle_t *cycle, ngx_uint_t nowait); 201 ngx_int_t (*process_changes)(ngx_cycle_t *cycle, ngx_uint_t nowait);
199 ngx_int_t (*process_events)(ngx_cycle_t *cycle); 202 ngx_int_t (*process_events)(ngx_cycle_t *cycle, ngx_msec_t timer,
200 203 ngx_uint_t flags);
201 ngx_int_t (*init)(ngx_cycle_t *cycle); 204
205 ngx_int_t (*init)(ngx_cycle_t *cycle, ngx_msec_t timer);
202 void (*done)(ngx_cycle_t *cycle); 206 void (*done)(ngx_cycle_t *cycle);
203 } ngx_event_actions_t; 207 } ngx_event_actions_t;
204 208
205 209
206 extern ngx_event_actions_t ngx_event_actions; 210 extern ngx_event_actions_t ngx_event_actions;
212 */ 216 */
213 #define NGX_USE_LEVEL_EVENT 0x00000001 217 #define NGX_USE_LEVEL_EVENT 0x00000001
214 218
215 /* 219 /*
216 * The event filter is deleted after a notification without an additional 220 * The event filter is deleted after a notification without an additional
217 * syscall: select, poll, kqueue, epoll, Solaris 10's event ports. 221 * syscall: kqueue, epoll, Solaris 10's event ports.
218 */ 222 */
219 #define NGX_USE_ONESHOT_EVENT 0x00000002 223 #define NGX_USE_ONESHOT_EVENT 0x00000002
220 224
221 /* 225 /*
222 * The event filter notifies only the changes and an initial level: 226 * The event filter notifies only the changes and an initial level:
267 /* 271 /*
268 * The event filter has no opaque data and requires file descriptors table: 272 * The event filter has no opaque data and requires file descriptors table:
269 * poll, /dev/poll, rt signals. 273 * poll, /dev/poll, rt signals.
270 */ 274 */
271 #define NGX_USE_FD_EVENT 0x00000400 275 #define NGX_USE_FD_EVENT 0x00000400
276
277 /*
278 * The event module handles periodic or absolute timer event by itself:
279 * kqueue in FreeBSD 4.4 and NetBSD 2.0, Solaris 10's event ports.
280 */
281 #define NGX_USE_TIMER_EVENT 0x00000800
272 282
273 283
274 284
275 /* 285 /*
276 * The event filter is deleted before the closing file. 286 * The event filter is deleted before the closing file.
444 extern ngx_atomic_t *ngx_stat_writing; 454 extern ngx_atomic_t *ngx_stat_writing;
445 455
446 #endif 456 #endif
447 457
448 458
449 459 #define NGX_UPDATE_TIME 1
450 #define ngx_accept_mutex_unlock() \ 460 #define NGX_POST_EVENTS 2
451 if (ngx_accept_mutex_held) { \ 461 #define NGX_POST_THREAD_EVENTS 4
452 *ngx_accept_mutex = 0; \ 462
453 } 463
454 464 extern sig_atomic_t ngx_event_timer_alarm;
455
456 extern ngx_uint_t ngx_event_flags; 465 extern ngx_uint_t ngx_event_flags;
457 extern ngx_module_t ngx_events_module; 466 extern ngx_module_t ngx_events_module;
458 extern ngx_module_t ngx_event_core_module; 467 extern ngx_module_t ngx_event_core_module;
459 468
460 469
468 ngx_int_t ngx_disable_accept_events(ngx_cycle_t *cycle); 477 ngx_int_t ngx_disable_accept_events(ngx_cycle_t *cycle);
469 ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle); 478 ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle);
470 u_char *ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len); 479 u_char *ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len);
471 480
472 481
482 void ngx_process_events_and_timers(ngx_cycle_t *cycle);
473 ngx_int_t ngx_handle_read_event(ngx_event_t *rev, u_int flags); 483 ngx_int_t ngx_handle_read_event(ngx_event_t *rev, u_int flags);
474 ngx_int_t ngx_handle_write_event(ngx_event_t *wev, size_t lowat); 484 ngx_int_t ngx_handle_write_event(ngx_event_t *wev, size_t lowat);
475 485
476 486
477 #if (NGX_WIN32) 487 #if (NGX_WIN32)