ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Linux-Inotify2/inotify-syscalls.h
Revision: 1.1
Committed: Mon Aug 22 09:51:38 2005 UTC (18 years, 10 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-1_0, rel-1_2, rel-1_01, rel-0_8
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #ifndef _LINUX_INOTIFY_SYSCALLS_H
2     #define _LINUX_INOTIFY_SYSCALLS_H
3    
4     #include <sys/syscall.h>
5    
6     #if defined(__i386__)
7     # define __NR_inotify_init 291
8     # define __NR_inotify_add_watch 292
9     # define __NR_inotify_rm_watch 293
10     #elif defined(__x86_64__)
11     # define __NR_inotify_init 253
12     # define __NR_inotify_add_watch 254
13     # define __NR_inotify_rm_watch 255
14     #elif defined(__powerpc__) || defined(__powerpc64__)
15     # define __NR_inotify_init 275
16     # define __NR_inotify_add_watch 276
17     # define __NR_inotify_rm_watch 277
18     #elif defined (__ia64__)
19     # define __NR_inotify_init 1277
20     # define __NR_inotify_add_watch 1278
21     # define __NR_inotify_rm_watch 1279
22     #elif defined (__s390__)
23     # define __NR_inotify_init 284
24     # define __NR_inotify_add_watch 285
25     # define __NR_inotify_rm_watch 286
26     #elif defined (__alpha__)
27     # define __NR_inotify_init 444
28     # define __NR_inotify_add_watch 445
29     # define __NR_inotify_rm_watch 446
30     #elif defined (__sparc__) || defined (__sparc64__)
31     # define __NR_inotify_init 151
32     # define __NR_inotify_add_watch 152
33     # define __NR_inotify_rm_watch 156
34     #elif defined (__arm__)
35     # define __NR_inotify_init 316
36     # define __NR_inotify_add_watch 317
37     # define __NR_inotify_rm_watch 318
38     #elif defined (__sh__)
39     # define __NR_inotify_init 290
40     # define __NR_inotify_add_watch 291
41     # define __NR_inotify_rm_watch 292
42     #else
43     # error "Unsupported architecture!"
44     #endif
45    
46     static inline int inotify_init (void)
47     {
48     return syscall (__NR_inotify_init);
49     }
50    
51     static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
52     {
53     return syscall (__NR_inotify_add_watch, fd, name, mask);
54     }
55    
56     static inline int inotify_rm_watch (int fd, __u32 wd)
57     {
58     return syscall (__NR_inotify_rm_watch, fd, wd);
59     }
60    
61     #endif /* _LINUX_INOTIFY_SYSCALLS_H */