Mercurial > hg > nginx-quic
comparison src/event/ngx_event.h @ 276:a2d1ccc96111
nginx-0.0.2-2004-03-03-00:14:37 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 02 Mar 2004 21:14:37 +0000 |
parents | d4e65d74db9f |
children | 7c7183b3ea8b |
comparison
equal
deleted
inserted
replaced
275:b836469c37c3 | 276:a2d1ccc96111 |
---|---|
2 #define _NGX_EVENT_H_INCLUDED_ | 2 #define _NGX_EVENT_H_INCLUDED_ |
3 | 3 |
4 | 4 |
5 #include <ngx_config.h> | 5 #include <ngx_config.h> |
6 #include <ngx_core.h> | 6 #include <ngx_core.h> |
7 | |
8 | |
9 typedef void (*ngx_event_handler_pt)(ngx_event_t *ev); | |
7 | 10 |
8 | 11 |
9 #define NGX_INVALID_INDEX 0xd0d0d0d0 | 12 #define NGX_INVALID_INDEX 0xd0d0d0d0 |
10 | 13 |
11 | 14 |
28 } ngx_event_mutex_t; | 31 } ngx_event_mutex_t; |
29 | 32 |
30 | 33 |
31 struct ngx_event_s { | 34 struct ngx_event_s { |
32 void *data; | 35 void *data; |
36 | |
33 /* TODO rename to handler */ | 37 /* TODO rename to handler */ |
34 void (*event_handler)(ngx_event_t *ev); | 38 ngx_event_handler_pt event_handler; |
35 | 39 |
36 u_int index; | 40 u_int index; |
37 | 41 |
38 /* the link of the posted queue or the event mutecies queues */ | 42 /* the link of the posted queue or the event mutecies queues */ |
39 ngx_event_t *next; | 43 ngx_event_t *next; |
379 ngx_event_actions_t actions; | 383 ngx_event_actions_t actions; |
380 } ngx_event_module_t; | 384 } ngx_event_module_t; |
381 | 385 |
382 | 386 |
383 | 387 |
384 extern volatile ngx_event_t *ngx_posted_events; | 388 extern ngx_thread_volatile ngx_event_t *ngx_posted_events; |
389 #if (NGX_THREADS) | |
390 extern ngx_mutex_t *ngx_posted_events_mutex; | |
391 #endif | |
385 | 392 |
386 extern int ngx_event_flags; | 393 extern int ngx_event_flags; |
387 extern ngx_module_t ngx_events_module; | 394 extern ngx_module_t ngx_events_module; |
388 extern ngx_module_t ngx_event_core_module; | 395 extern ngx_module_t ngx_event_core_module; |
389 | 396 |
404 /* used in ngx_log_debugX() */ | 411 /* used in ngx_log_debugX() */ |
405 #define ngx_event_ident(p) ((ngx_connection_t *) (p))->fd | 412 #define ngx_event_ident(p) ((ngx_connection_t *) (p))->fd |
406 | 413 |
407 | 414 |
408 #include <ngx_event_timer.h> | 415 #include <ngx_event_timer.h> |
416 #include <ngx_event_busy_lock.h> | |
409 | 417 |
410 #if (WIN32) | 418 #if (WIN32) |
411 #include <ngx_iocp_module.h> | 419 #include <ngx_iocp_module.h> |
412 #endif | 420 #endif |
413 | 421 |