source:
trunk/include/sh_inotify.h@
364
Last change on this file since 364 was 364, checked in by , 13 years ago | |
---|---|
File size: 647 bytes |
Rev | Line | |
---|---|---|
[261] | 1 | #ifndef SH_INOTIFY_H |
2 | #define SH_INOTIFY_H | |
3 | ||
4 | #define SH_INOTIFY_MAX 128 | |
5 | ||
6 | typedef struct | |
7 | { | |
[363] | 8 | void * list_of_watches; |
[364] | 9 | void * dormant_watches; |
[363] | 10 | |
[364] | 11 | /* |
[261] | 12 | int watch[SH_INOTIFY_MAX]; |
13 | int flag[SH_INOTIFY_MAX]; | |
14 | char * file[SH_INOTIFY_MAX]; | |
[364] | 15 | */ |
[261] | 16 | |
[363] | 17 | int count; |
18 | int max_count; | |
[261] | 19 | } sh_watches; |
20 | ||
[363] | 21 | #define SH_INOTIFY_INITIALIZER { { 0 }, { 0 }, { NULL}, 0, 0 } |
22 | ||
[261] | 23 | int sh_inotify_wait_for_change(char * filename, sh_watches * watches, |
24 | int * errnum, int waitsec); | |
25 | ||
26 | int sh_inotify_add_watch(char * filename, sh_watches * watches, int * errnum); | |
27 | ||
28 | void sh_inotify_remove(sh_watches * watches); | |
29 | ||
30 | #define SH_INOTIFY_ERROR(a) (a != 0) | |
31 | ||
32 | #endif |
Note:
See TracBrowser
for help on using the repository browser.