comparison src/event/ngx_event.h @ 719:f30b1a75fd3b

Solaris 10 event ports support
author Igor Sysoev <igor@sysoev.ru>
date Tue, 26 Sep 2006 12:20:12 +0000
parents 5fd7a5e99047
children f69d1aab6a0f ba92cccf5435
comparison
equal deleted inserted replaced
718:d488926182ea 719:f30b1a75fd3b
39 39
40 unsigned write:1; 40 unsigned write:1;
41 41
42 unsigned accept:1; 42 unsigned accept:1;
43 43
44 unsigned oneshot:1;
45
46 /* used to detect the stale events in kqueue, rt signals and epoll */ 44 /* used to detect the stale events in kqueue, rt signals and epoll */
47 unsigned instance:1; 45 unsigned instance:1;
48 46
49 /* 47 /*
50 * the event was passed or would be passed to a kernel; 48 * the event was passed or would be passed to a kernel;
54 52
55 unsigned disabled:1; 53 unsigned disabled:1;
56 54
57 /* the ready event; in aio mode 0 means that no operation can be posted */ 55 /* the ready event; in aio mode 0 means that no operation can be posted */
58 unsigned ready:1; 56 unsigned ready:1;
57
58 unsigned oneshot:1;
59 59
60 /* aio operation is complete */ 60 /* aio operation is complete */
61 unsigned complete:1; 61 unsigned complete:1;
62 62
63 unsigned eof:1; 63 unsigned eof:1;
222 */ 222 */
223 #define NGX_USE_LEVEL_EVENT 0x00000001 223 #define NGX_USE_LEVEL_EVENT 0x00000001
224 224
225 /* 225 /*
226 * The event filter is deleted after a notification without an additional 226 * The event filter is deleted after a notification without an additional
227 * syscall: kqueue, epoll, Solaris 10's event ports. 227 * syscall: kqueue, epoll.
228 */ 228 */
229 #define NGX_USE_ONESHOT_EVENT 0x00000002 229 #define NGX_USE_ONESHOT_EVENT 0x00000002
230 230
231 /* 231 /*
232 * The event filter notifies only the changes and an initial level: 232 * The event filter notifies only the changes and an initial level:
284 * The event module handles periodic or absolute timer event by itself: 284 * The event module handles periodic or absolute timer event by itself:
285 * kqueue in FreeBSD 4.4 and NetBSD 2.0, Solaris 10's event ports. 285 * kqueue in FreeBSD 4.4 and NetBSD 2.0, Solaris 10's event ports.
286 */ 286 */
287 #define NGX_USE_TIMER_EVENT 0x00000800 287 #define NGX_USE_TIMER_EVENT 0x00000800
288 288
289 /*
290 * All event filters on file descriptor are deleted after a notification:
291 * Solaris 10's event ports.
292 */
293 #define NGX_USE_EVENTPORT_EVENT 0x00001000
294
289 295
290 296
291 /* 297 /*
292 * The event filter is deleted before the closing file. 298 * The event filter is deleted before the closing file.
293 * Has no meaning for select, poll, epoll. 299 * Has no meaning for select, poll, kqueue, epoll.
294 *
295 * kqueue: kqueue deletes event filters for file that closed
296 * so we need only to delete filters in user-level batch array
297 * /dev/poll: we need to flush POLLREMOVE event before closing file 300 * /dev/poll: we need to flush POLLREMOVE event before closing file
298 */ 301 */
299 302
300 #define NGX_CLOSE_EVENT 1 303 #define NGX_CLOSE_EVENT 1
301 #define NGX_DISABLE_EVENT 2 304 #define NGX_DISABLE_EVENT 2
333 336
334 #undef NGX_DISABLE_EVENT 337 #undef NGX_DISABLE_EVENT
335 #define NGX_DISABLE_EVENT EV_DISABLE 338 #define NGX_DISABLE_EVENT EV_DISABLE
336 339
337 340
338 #elif (NGX_HAVE_DEVPOLL) 341 #elif (NGX_HAVE_DEVPOLL || NGX_HAVE_EVENTPORT)
339 342
340 #define NGX_READ_EVENT POLLIN 343 #define NGX_READ_EVENT POLLIN
341 #define NGX_WRITE_EVENT POLLOUT 344 #define NGX_WRITE_EVENT POLLOUT
342 345
343 #define NGX_LEVEL_EVENT 0 346 #define NGX_LEVEL_EVENT 0
444 extern ngx_atomic_t *ngx_connection_counter; 447 extern ngx_atomic_t *ngx_connection_counter;
445 448
446 extern ngx_atomic_t *ngx_accept_mutex_ptr; 449 extern ngx_atomic_t *ngx_accept_mutex_ptr;
447 extern ngx_shmtx_t ngx_accept_mutex; 450 extern ngx_shmtx_t ngx_accept_mutex;
448 extern ngx_uint_t ngx_use_accept_mutex; 451 extern ngx_uint_t ngx_use_accept_mutex;
452 extern ngx_uint_t ngx_accept_events;
449 extern ngx_uint_t ngx_accept_mutex_held; 453 extern ngx_uint_t ngx_accept_mutex_held;
450 extern ngx_msec_t ngx_accept_mutex_delay; 454 extern ngx_msec_t ngx_accept_mutex_delay;
451 extern ngx_int_t ngx_accept_disabled; 455 extern ngx_int_t ngx_accept_disabled;
452 456
453 457