~ubuntu-branches/ubuntu/trusty/glib2.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gio/inotify/local_inotify_syscalls.h

Tags: upstream-2.15.3
ImportĀ upstreamĀ versionĀ 2.15.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _LINUX_INOTIFY_SYSCALLS_H
2
 
#define _LINUX_INOTIFY_SYSCALLS_H
3
 
 
4
 
#include <asm/types.h>
5
 
#include <sys/syscall.h>
6
 
#include <unistd.h>
7
 
 
8
 
#if defined(__i386__)
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
48
 
#else
49
 
# warning "Unsupported architecture"
50
 
#endif
51
 
 
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)
54
 
{
55
 
        return syscall (__NR_inotify_init);
56
 
}
57
 
 
58
 
static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
59
 
{
60
 
        return syscall (__NR_inotify_add_watch, fd, name, mask);
61
 
}
62
 
 
63
 
static inline int inotify_rm_watch (int fd, __u32 wd)
64
 
{
65
 
        return syscall (__NR_inotify_rm_watch, fd, wd);
66
 
}
67
 
#else
68
 
static inline int inotify_init (void)
69
 
{
70
 
        return -1;
71
 
}
72
 
 
73
 
static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
74
 
{
75
 
        return -1;
76
 
}
77
 
 
78
 
static inline int inotify_rm_watch (int fd, __u32 wd)
79
 
{
80
 
        return -1;
81
 
}
82
 
 
83
 
#endif
84
 
 
85
 
#endif /* _LINUX_INOTIFY_SYSCALLS_H */