1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2*4882a593Smuzhiyun #ifndef __ASM_GENERIC_POLL_H 3*4882a593Smuzhiyun #define __ASM_GENERIC_POLL_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun /* These are specified by iBCS2 */ 6*4882a593Smuzhiyun #define POLLIN 0x0001 7*4882a593Smuzhiyun #define POLLPRI 0x0002 8*4882a593Smuzhiyun #define POLLOUT 0x0004 9*4882a593Smuzhiyun #define POLLERR 0x0008 10*4882a593Smuzhiyun #define POLLHUP 0x0010 11*4882a593Smuzhiyun #define POLLNVAL 0x0020 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun /* The rest seem to be more-or-less nonstandard. Check them! */ 14*4882a593Smuzhiyun #define POLLRDNORM 0x0040 15*4882a593Smuzhiyun #define POLLRDBAND 0x0080 16*4882a593Smuzhiyun #ifndef POLLWRNORM 17*4882a593Smuzhiyun #define POLLWRNORM 0x0100 18*4882a593Smuzhiyun #endif 19*4882a593Smuzhiyun #ifndef POLLWRBAND 20*4882a593Smuzhiyun #define POLLWRBAND 0x0200 21*4882a593Smuzhiyun #endif 22*4882a593Smuzhiyun #ifndef POLLMSG 23*4882a593Smuzhiyun #define POLLMSG 0x0400 24*4882a593Smuzhiyun #endif 25*4882a593Smuzhiyun #ifndef POLLREMOVE 26*4882a593Smuzhiyun #define POLLREMOVE 0x1000 27*4882a593Smuzhiyun #endif 28*4882a593Smuzhiyun #ifndef POLLRDHUP 29*4882a593Smuzhiyun #define POLLRDHUP 0x2000 30*4882a593Smuzhiyun #endif 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #define POLLFREE (__force __poll_t)0x4000 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun #define POLL_BUSY_LOOP (__force __poll_t)0x8000 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun struct pollfd { 37*4882a593Smuzhiyun int fd; 38*4882a593Smuzhiyun short events; 39*4882a593Smuzhiyun short revents; 40*4882a593Smuzhiyun }; 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun #endif /* __ASM_GENERIC_POLL_H */ 43