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 */ 67a163b21SAl Viro #define POLLIN 0x0001 77a163b21SAl Viro #define POLLPRI 0x0002 87a163b21SAl Viro #define POLLOUT 0x0004 97a163b21SAl Viro #define POLLERR 0x0008 107a163b21SAl Viro #define POLLHUP 0x0010 117a163b21SAl Viro #define POLLNVAL 0x0020 128a1ab315SDavid Howells 138a1ab315SDavid Howells /* The rest seem to be more-or-less nonstandard. Check them! */ 147a163b21SAl Viro #define POLLRDNORM 0x0040 157a163b21SAl Viro #define POLLRDBAND 0x0080 168a1ab315SDavid Howells #ifndef POLLWRNORM 177a163b21SAl Viro #define POLLWRNORM 0x0100 188a1ab315SDavid Howells #endif 198a1ab315SDavid Howells #ifndef POLLWRBAND 207a163b21SAl Viro #define POLLWRBAND 0x0200 218a1ab315SDavid Howells #endif 228a1ab315SDavid Howells #ifndef POLLMSG 237a163b21SAl Viro #define POLLMSG 0x0400 248a1ab315SDavid Howells #endif 258a1ab315SDavid Howells #ifndef POLLREMOVE 267a163b21SAl Viro #define POLLREMOVE 0x1000 278a1ab315SDavid Howells #endif 288a1ab315SDavid Howells #ifndef POLLRDHUP 297a163b21SAl Viro #define POLLRDHUP 0x2000 308a1ab315SDavid Howells #endif 318a1ab315SDavid Howells 32*60d311f9SEric Biggers #define POLLFREE (__force __poll_t)0x4000 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