summaryrefslogtreecommitdiff
path: root/inotify-syscalls.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@xenon.localdomain>2006-03-13 18:16:41 +0100
committerTobias Klauser <tklauser@xenon.localdomain>2006-03-13 18:16:41 +0100
commit135b557f6d14c3ce4d60419602d8ca92316f9a71 (patch)
treecfde71b422209b1faf48bd95b544d36700d4e635 /inotify-syscalls.h
Initial import
Diffstat (limited to 'inotify-syscalls.h')
-rw-r--r--inotify-syscalls.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/inotify-syscalls.h b/inotify-syscalls.h
new file mode 100644
index 0000000..1431d46
--- /dev/null
+++ b/inotify-syscalls.h
@@ -0,0 +1,61 @@
+#ifndef _LINUX_INOTIFY_SYSCALLS_H
+#define _LINUX_INOTIFY_SYSCALLS_H
+
+#include <sys/syscall.h>
+
+#if defined(__i386__)
+# define __NR_inotify_init 291
+# define __NR_inotify_add_watch 292
+# define __NR_inotify_rm_watch 293
+#elif defined(__x86_64__)
+# define __NR_inotify_init 253
+# define __NR_inotify_add_watch 254
+# define __NR_inotify_rm_watch 255
+#elif defined(__powerpc__) || defined(__powerpc64__)
+# define __NR_inotify_init 275
+# define __NR_inotify_add_watch 276
+# define __NR_inotify_rm_watch 277
+#elif defined (__ia64__)
+# define __NR_inotify_init 1277
+# define __NR_inotify_add_watch 1278
+# define __NR_inotify_rm_watch 1279
+#elif defined (__s390__)
+# define __NR_inotify_init 284
+# define __NR_inotify_add_watch 285
+# define __NR_inotify_rm_watch 286
+#elif defined (__alpha__)
+# define __NR_inotify_init 444
+# define __NR_inotify_add_watch 445
+# define __NR_inotify_rm_watch 446
+#elif defined (__sparc__) || defined (__sparc64__)
+# define __NR_inotify_init 151
+# define __NR_inotify_add_watch 152
+# define __NR_inotify_rm_watch 156
+#elif defined (__arm__)
+# define __NR_inotify_init 316
+# define __NR_inotify_add_watch 317
+# define __NR_inotify_rm_watch 318
+#elif defined (__sh__)
+# define __NR_inotify_init 290
+# define __NR_inotify_add_watch 291
+# define __NR_inotify_rm_watch 292
+#else
+# error "Unsupported architecture!"
+#endif
+
+static inline int inotify_init (void)
+{
+ return syscall (__NR_inotify_init);
+}
+
+static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
+{
+ return syscall (__NR_inotify_add_watch, fd, name, mask);
+}
+
+static inline int inotify_rm_watch (int fd, __u32 wd)
+{
+ return syscall (__NR_inotify_rm_watch, fd, wd);
+}
+
+#endif /* _LINUX_INOTIFY_SYSCALLS_H */
00'>2011-11-02thp: share get_huge_page_tail()Andrea Arcangeli1-11/+0 2011-11-02s390: gup_huge_pmd() return 0 if pte changesAndrea Arcangeli1-10/+11 2011-11-02s390: gup_huge_pmd() support THP tail recountingAndrea Arcangeli1-1/+23 2010-11-10[S390] fix get_user_pages_fastMartin Schwidefsky1-4/+3 2010-10-25[S390] lockless get_user_pages_fast()Martin Schwidefsky1-0/+225