diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-11-30 03:00:41 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-11-30 03:00:41 +0300 |
commit | c71d227fc4133f949dae620ed5e3a250b43f2415 (patch) | |
tree | ce12b907996c2acd37e9d86f4ba492b09a0ab0f8 /include/uapi/asm-generic | |
parent | 69112736e2f025ff3ba280cf81c36e25cf7cc59f (diff) | |
download | linux-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.h | 14 |
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; |