aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/compat.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index fe4ccd0c748a..f964ef79e0ad 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -5,6 +5,8 @@
5 * syscall compatibility layer. 5 * syscall compatibility layer.
6 */ 6 */
7 7
8#include <linux/types.h>
9
8#ifdef CONFIG_COMPAT 10#ifdef CONFIG_COMPAT
9 11
10#include <linux/stat.h> 12#include <linux/stat.h>
@@ -719,9 +721,22 @@ asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid,
719 721
720asmlinkage long compat_sys_fanotify_mark(int, unsigned int, __u32, __u32, 722asmlinkage long compat_sys_fanotify_mark(int, unsigned int, __u32, __u32,
721 int, const char __user *); 723 int, const char __user *);
724
725/*
726 * For most but not all architectures, "am I in a compat syscall?" and
727 * "am I a compat task?" are the same question. For architectures on which
728 * they aren't the same question, arch code can override in_compat_syscall.
729 */
730
731#ifndef in_compat_syscall
732static inline bool in_compat_syscall(void) { return is_compat_task(); }
733#endif
734
722#else 735#else
723 736
724#define is_compat_task() (0) 737#define is_compat_task() (0)
738static inline bool in_compat_syscall(void) { return false; }
725 739
726#endif /* CONFIG_COMPAT */ 740#endif /* CONFIG_COMPAT */
741
727#endif /* _LINUX_COMPAT_H */ 742#endif /* _LINUX_COMPAT_H */