1
#ifndef _LINUX_INOTIFY_SYSCALLS_H
2
#define _LINUX_INOTIFY_SYSCALLS_H
5
#include <sys/syscall.h>
9
# define __NR_inotify_init 291
10
# define __NR_inotify_add_watch 292
11
# define __NR_inotify_rm_watch 293
12
#elif defined(__x86_64__)
13
# define __NR_inotify_init 253
14
# define __NR_inotify_add_watch 254
15
# define __NR_inotify_rm_watch 255
16
#elif defined(__alpha__)
17
# define __NR_inotify_init 444
18
# define __NR_inotify_add_watch 445
19
# define __NR_inotify_rm_watch 446
20
#elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
21
# define __NR_inotify_init 275
22
# define __NR_inotify_add_watch 276
23
# define __NR_inotify_rm_watch 277
24
#elif defined(__sparc__) || defined (__sparc64__)
25
# define __NR_inotify_init 151
26
# define __NR_inotify_add_watch 152
27
# define __NR_inotify_rm_watch 156
28
#elif defined (__ia64__)
29
# define __NR_inotify_init 1277
30
# define __NR_inotify_add_watch 1278
31
# define __NR_inotify_rm_watch 1279
32
#elif defined (__s390__) || defined (__s390x__)
33
# define __NR_inotify_init 284
34
# define __NR_inotify_add_watch 285
35
# define __NR_inotify_rm_watch 286
36
#elif defined (__arm__)
37
# define __NR_inotify_init 316
38
# define __NR_inotify_add_watch 317
39
# define __NR_inotify_rm_watch 318
40
#elif defined (__SH4__)
41
# define __NR_inotify_init 290
42
# define __NR_inotify_add_watch 291
43
# define __NR_inotify_rm_watch 292
44
#elif defined (__SH5__)
45
# define __NR_inotify_init 318
46
# define __NR_inotify_add_watch 319
47
# define __NR_inotify_rm_watch 320
49
# warning "Unsupported architecture"
52
#if defined(__i386__) || defined(__x86_64) || defined(__alpha__) || defined(__ppc__) || defined(__sparc__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__ia64__) || defined(__s390__)
53
static inline int inotify_init (void)
55
return syscall (__NR_inotify_init);
58
static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
60
return syscall (__NR_inotify_add_watch, fd, name, mask);
63
static inline int inotify_rm_watch (int fd, __u32 wd)
65
return syscall (__NR_inotify_rm_watch, fd, wd);
68
static inline int inotify_init (void)
73
static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
78
static inline int inotify_rm_watch (int fd, __u32 wd)
85
#endif /* _LINUX_INOTIFY_SYSCALLS_H */