summaryrefslogtreecommitdiff
path: root/include/uapi/asm-generic
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-11-30 03:00:41 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2017-11-30 03:00:41 +0300
commitc71d227fc4133f949dae620ed5e3a250b43f2415 (patch)
treece12b907996c2acd37e9d86f4ba492b09a0ab0f8 /include/uapi/asm-generic
parent69112736e2f025ff3ba280cf81c36e25cf7cc59f (diff)
downloadlinux-c71d227fc4133f949dae620ed5e3a250b43f2415.tar.xz
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/asm-generic')
-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;