add syscall wrappers for inotify

This commit is contained in:
Rich Felker
2011-02-19 02:52:29 -05:00
parent cc2a8228fa
commit 095a5ae6f2
5 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,7 @@
#include <sys/inotify.h>
#include "syscall.h"
int inotify_add_watch(int fd, const char *pathname, uint32_t mask)
{
return syscall3(__NR_inotify_add_watch, fd, (long)pathname, mask);
}

7
src/linux/inotify_init.c Normal file
View File

@ -0,0 +1,7 @@
#include <sys/inotify.h>
#include "syscall.h"
int inotify_init()
{
return syscall0(__NR_inotify_init);
}

View File

@ -0,0 +1,7 @@
#include <sys/inotify.h>
#include "syscall.h"
int inotify_init1(int flags)
{
return syscall1(__NR_inotify_init1, flags);
}

View File

@ -0,0 +1,7 @@
#include <sys/inotify.h>
#include "syscall.h"
int inotify_rm_watch(int fd, uint32_t wd)
{
return syscall2(__NR_inotify_rm_watch, fd, wd);
}