xref: /openbmc/linux/include/uapi/asm-generic/poll.h (revision 8ced390c)
16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28a1ab315SDavid Howells #ifndef __ASM_GENERIC_POLL_H
38a1ab315SDavid Howells #define __ASM_GENERIC_POLL_H
48a1ab315SDavid Howells 
58a1ab315SDavid Howells /* These are specified by iBCS2 */
68ced390cSAl Viro #define POLLIN		(__force __poll_t)0x0001
78ced390cSAl Viro #define POLLPRI		(__force __poll_t)0x0002
88ced390cSAl Viro #define POLLOUT		(__force __poll_t)0x0004
98ced390cSAl Viro #define POLLERR		(__force __poll_t)0x0008
108ced390cSAl Viro #define POLLHUP		(__force __poll_t)0x0010
118ced390cSAl Viro #define POLLNVAL	(__force __poll_t)0x0020
128a1ab315SDavid Howells 
138a1ab315SDavid Howells /* The rest seem to be more-or-less nonstandard. Check them! */
148ced390cSAl Viro #define POLLRDNORM	(__force __poll_t)0x0040
158ced390cSAl Viro #define POLLRDBAND	(__force __poll_t)0x0080
168a1ab315SDavid Howells #ifndef POLLWRNORM
178ced390cSAl Viro #define POLLWRNORM	(__force __poll_t)0x0100
188a1ab315SDavid Howells #endif
198a1ab315SDavid Howells #ifndef POLLWRBAND
208ced390cSAl Viro #define POLLWRBAND	(__force __poll_t)0x0200
218a1ab315SDavid Howells #endif
228a1ab315SDavid Howells #ifndef POLLMSG
238ced390cSAl Viro #define POLLMSG		(__force __poll_t)0x0400
248a1ab315SDavid Howells #endif
258a1ab315SDavid Howells #ifndef POLLREMOVE
268ced390cSAl Viro #define POLLREMOVE	(__force __poll_t)0x1000
278a1ab315SDavid Howells #endif
288a1ab315SDavid Howells #ifndef POLLRDHUP
298ced390cSAl Viro #define POLLRDHUP       (__force __poll_t)0x2000
308a1ab315SDavid Howells #endif
318a1ab315SDavid Howells 
328ced390cSAl Viro #define POLLFREE	(__force __poll_t)0x4000	/* currently only for epoll */
338a1ab315SDavid Howells 
348ced390cSAl Viro #define POLL_BUSY_LOOP	(__force __poll_t)0x8000
352d48d67fSEliezer Tamir 
368a1ab315SDavid Howells struct pollfd {
378a1ab315SDavid Howells 	int fd;
388a1ab315SDavid Howells 	short events;
398a1ab315SDavid Howells 	short revents;
408a1ab315SDavid Howells };
418a1ab315SDavid Howells 
428a1ab315SDavid Howells #endif	/* __ASM_GENERIC_POLL_H */
43