MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / linux / seccomp.h
blob3e8b1cf54303cf42f155c36630162b3fadcbeded
1 #ifndef _LINUX_SECCOMP_H
2 #define _LINUX_SECCOMP_H
5 #ifdef CONFIG_SECCOMP
7 #define NR_SECCOMP_MODES 1
9 #include <linux/thread_info.h>
10 #include <asm/seccomp.h>
12 typedef struct { int mode; } seccomp_t;
14 extern void __secure_computing(int);
15 static inline void secure_computing(int this_syscall)
17 if (unlikely(test_thread_flag(TIF_SECCOMP)))
18 __secure_computing(this_syscall);
21 static inline int has_secure_computing(struct thread_info *ti)
23 return unlikely(test_ti_thread_flag(ti, TIF_SECCOMP));
26 #else /* CONFIG_SECCOMP */
28 typedef struct { } seccomp_t;
30 #define secure_computing(x) do { } while (0)
31 /* static inline to preserve typechecking */
32 static inline int has_secure_computing(struct thread_info *ti)
34 return 0;
37 #endif /* CONFIG_SECCOMP */
39 #endif /* _LINUX_SECCOMP_H */