Logo Search packages:      
Sourcecode: mswatch version File versions  Download package

inotify-syscalls.h

/* Copy of
 * http://www.kernel.org/pub/linux/kernel/people/rml/inotify/headers/inotify-syscalls.h
 * from 2006/07/15 plus PARISC support from Linux 2.6.16-pa11 and <unistd.h> */

#ifndef _LINUX_INOTIFY_SYSCALLS_H
#define _LINUX_INOTIFY_SYSCALLS_H

#include <unistd.h> // syscall()
#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
#elif defined (__hppa__)
# define __NR_inotify_init  (__NR_Linux + 269)
# define __NR_inotify_add_watch   (__NR_Linux + 270)
# define __NR_inotify_rm_watch (__NR_Linux + 271)
#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 */

Generated by  Doxygen 1.6.0   Back to index