source: Plugins/dynamicResources/inotify-syscalls.h @ 31

Revision 31, 1.7 KB checked in by art, 13 years ago (diff)

dynamicResourceManagment Plugin added.

TODO: change file association list of resources. This is required
by the drm plugin to be able to reload the resource as soon as one of
the associated file changes.

Line 
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
46static inline int inotify_init (void)
47{
48        return syscall (__NR_inotify_init);
49}
50
51static 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
56static 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 */
Note: See TracBrowser for help on using the repository browser.