aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-11-29 19:00:41 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2017-11-29 19:00:41 -0500
commitc71d227fc4133f949dae620ed5e3a250b43f2415 (patch)
treece12b907996c2acd37e9d86f4ba492b09a0ab0f8 /include/uapi
parent69112736e2f025ff3ba280cf81c36e25cf7cc59f (diff)
make kernel-side POLL... arch-independent
mangle/demangle on the way to/from userland Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/asm-generic/poll.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/uapi/asm-generic/poll.h b/include/uapi/asm-generic/poll.h
index 8c0e9dd384b6..639fade14b23 100644
--- a/include/uapi/asm-generic/poll.h
+++ b/include/uapi/asm-generic/poll.h
@@ -33,6 +33,20 @@
#define POLL_BUSY_LOOP (__force __poll_t)0x8000
+#ifdef __KERNEL__
+#ifndef __ARCH_HAS_MANGLED_POLL
+static inline __u16 mangle_poll(__poll_t val)
+{
+ return (__force __u16)val;
+}
+
+static inline __poll_t demangle_poll(__u16 v)
+{
+ return (__force __poll_t)v;
+}
+#endif
+#endif
+
struct pollfd {
int fd;
short events;

Privacy Policy