]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/common/inotify.c
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / common / inotify.c
1 /* vi: set sw=4 ts=4: */
2 /*
3  * inotify interface for uClibc
4  *
5  * Copyright (C) 2006 Austin Morgan <admorgan@morgancomputers.net>
6  * Copyright (C) 2006 by Erik Andersen <andersen@codepoet.org>
7  *
8  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
9  */
10
11 #include <sys/syscall.h>
12 #include <sys/inotify.h>
13
14 #ifdef __NR_inotify_init
15 _syscall0(int, inotify_init)
16 #endif
17
18 #ifdef __NR_inotify_init1
19 _syscall1(int, inotify_init1, int, flags)
20 #endif
21
22 #if defined __NR_inotify_init1 && !defined __NR_inotify_init
23 int inotify_init(void)
24 {
25         return INLINE_SYSCALL(inotify_init1, 1, 0);
26 }
27 #endif
28
29 #ifdef __NR_inotify_add_watch
30 _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask)
31 #endif
32
33 #ifdef __NR_inotify_rm_watch
34 _syscall2(int, inotify_rm_watch, int, fd, int, wd)
35 #endif