Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/lib/ioloop-notify-fd.h @ 6410:e4eb71ae8e96 HEAD
Changed .h ifdef/defines to use <NAME>_H format.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 16 Sep 2007 11:31:27 +0300 |
parents | 12ac5f685814 |
children |
rev | line source |
---|---|
6410
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
5248
diff
changeset
|
1 #ifndef IOLOOP_NOTIFY_FD_H |
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
5248
diff
changeset
|
2 #define IOLOOP_NOTIFY_FD_H |
5248 | 3 |
4 /* common notify code for fd-based notifications (dnotify, inotify) */ | |
5 | |
6 struct io_notify { | |
7 struct io io; | |
8 | |
9 /* use a doubly linked list so that io_remove() is quick */ | |
10 struct io_notify *prev, *next; | |
11 | |
12 int fd; | |
13 }; | |
14 | |
15 struct ioloop_notify_fd_context { | |
16 struct io_notify *notifies; | |
17 }; | |
18 | |
19 struct io *io_notify_fd_add(struct ioloop_notify_fd_context *ctx, int fd, | |
20 io_callback_t *callback, void *context); | |
21 void io_notify_fd_free(struct ioloop_notify_fd_context *ctx, | |
22 struct io_notify *io); | |
23 | |
24 struct io_notify * | |
25 io_notify_fd_find(struct ioloop_notify_fd_context *ctx, int fd); | |
26 | |
27 #endif |