comparison src/event/ngx_event.h @ 1451:ae957ab627e2

NGX_USE_VNODE_EVENT and NGX_FLUSH_EVENT
author Igor Sysoev <igor@sysoev.ru>
date Sat, 01 Sep 2007 11:59:36 +0000
parents a392517403f5
children 0b592a68aade
comparison
equal deleted inserted replaced
1450:a392517403f5 1451:ae957ab627e2
289 * All event filters on file descriptor are deleted after a notification: 289 * All event filters on file descriptor are deleted after a notification:
290 * Solaris 10's event ports. 290 * Solaris 10's event ports.
291 */ 291 */
292 #define NGX_USE_EVENTPORT_EVENT 0x00001000 292 #define NGX_USE_EVENTPORT_EVENT 0x00001000
293 293
294 /*
295 * The event filter support vnode notifications: kqueue.
296 */
297 #define NGX_USE_VNODE_EVENT 0x00002000
294 298
295 299
296 /* 300 /*
297 * The event filter is deleted just before the closing file. 301 * The event filter is deleted just before the closing file.
298 * Has no meaning for select and poll. 302 * Has no meaning for select and poll.
309 * disable temporarily event filter, this may avoid locks 313 * disable temporarily event filter, this may avoid locks
310 * in kernel malloc()/free(): kqueue. 314 * in kernel malloc()/free(): kqueue.
311 */ 315 */
312 #define NGX_DISABLE_EVENT 2 316 #define NGX_DISABLE_EVENT 2
313 317
318 /*
319 * event must be passed to kernel right now, do not wait until batch processing.
320 */
321 #define NGX_FLUSH_EVENT 4
322
314 323
315 /* these flags have a meaning only for kqueue */ 324 /* these flags have a meaning only for kqueue */
316 #define NGX_LOWAT_EVENT 0 325 #define NGX_LOWAT_EVENT 0
317 #define NGX_VNODE_EVENT 0 326 #define NGX_VNODE_EVENT 0
318 327
324 333
325 #undef NGX_VNODE_EVENT 334 #undef NGX_VNODE_EVENT
326 #define NGX_VNODE_EVENT EVFILT_VNODE 335 #define NGX_VNODE_EVENT EVFILT_VNODE
327 336
328 /* 337 /*
329 * NGX_CLOSE_EVENT and NGX_LOWAT_EVENT are the module flags and they would 338 * NGX_CLOSE_EVENT, NGX_LOWAT_EVENT, and NGX_FLUSH_EVENT are the module flags
330 * not go into a kernel so we need to choose the value that would not interfere 339 * and they must not go into a kernel so we need to choose the value
331 * with any existent and future kqueue flags. kqueue has such values - 340 * that must not interfere with any existent and future kqueue flags.
332 * EV_FLAG1, EV_EOF and EV_ERROR. They are reserved and cleared on a kernel 341 * kqueue has such values - EV_FLAG1, EV_EOF, and EV_ERROR:
333 * entrance. 342 * they are reserved and cleared on a kernel entrance.
334 */ 343 */
335 #undef NGX_CLOSE_EVENT 344 #undef NGX_CLOSE_EVENT
336 #define NGX_CLOSE_EVENT EV_EOF 345 #define NGX_CLOSE_EVENT EV_EOF
337 346
338 #undef NGX_LOWAT_EVENT 347 #undef NGX_LOWAT_EVENT
339 #define NGX_LOWAT_EVENT EV_FLAG1 348 #define NGX_LOWAT_EVENT EV_FLAG1
349
350 #undef NGX_FLUSH_EVENT
351 #define NGX_FLUSH_EVENT EV_ERROR
340 352
341 #define NGX_LEVEL_EVENT 0 353 #define NGX_LEVEL_EVENT 0
342 #define NGX_ONESHOT_EVENT EV_ONESHOT 354 #define NGX_ONESHOT_EVENT EV_ONESHOT
343 #define NGX_CLEAR_EVENT EV_CLEAR 355 #define NGX_CLEAR_EVENT EV_CLEAR
344 356