~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/eventpoll.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2 /*
  3  *  include/linux/eventpoll.h ( Efficient event polling implementation )
  4  *  Copyright (C) 2001,...,2006  Davide Libenzi
  5  *
  6  *  This program is free software; you can redistribute it and/or modify
  7  *  it under the terms of the GNU General Public License as published by
  8  *  the Free Software Foundation; either version 2 of the License, or
  9  *  (at your option) any later version.
 10  *
 11  *  Davide Libenzi <davidel@xmailserver.org>
 12  *
 13  */
 14 
 15 #ifndef _UAPI_LINUX_EVENTPOLL_H
 16 #define _UAPI_LINUX_EVENTPOLL_H
 17 
 18 /* For O_CLOEXEC */
 19 #include <linux/fcntl.h>
 20 #include <linux/types.h>
 21 
 22 /* Flags for epoll_create1.  */
 23 #define EPOLL_CLOEXEC O_CLOEXEC
 24 
 25 /* Valid opcodes to issue to sys_epoll_ctl() */
 26 #define EPOLL_CTL_ADD 1
 27 #define EPOLL_CTL_DEL 2
 28 #define EPOLL_CTL_MOD 3
 29 
 30 /* Epoll event masks */
 31 #define EPOLLIN         (__force __poll_t)0x00000001
 32 #define EPOLLPRI        (__force __poll_t)0x00000002
 33 #define EPOLLOUT        (__force __poll_t)0x00000004
 34 #define EPOLLERR        (__force __poll_t)0x00000008
 35 #define EPOLLHUP        (__force __poll_t)0x00000010
 36 #define EPOLLNVAL       (__force __poll_t)0x00000020
 37 #define EPOLLRDNORM     (__force __poll_t)0x00000040
 38 #define EPOLLRDBAND     (__force __poll_t)0x00000080
 39 #define EPOLLWRNORM     (__force __poll_t)0x00000100
 40 #define EPOLLWRBAND     (__force __poll_t)0x00000200
 41 #define EPOLLMSG        (__force __poll_t)0x00000400
 42 #define EPOLLRDHUP      (__force __poll_t)0x00002000
 43 
 44 /*
 45  * Internal flag - wakeup generated by io_uring, used to detect recursion back
 46  * into the io_uring poll handler.
 47  */
 48 #define EPOLL_URING_WAKE        ((__force __poll_t)(1U << 27))
 49 
 50 /* Set exclusive wakeup mode for the target file descriptor */
 51 #define EPOLLEXCLUSIVE  ((__force __poll_t)(1U << 28))
 52 
 53 /*
 54  * Request the handling of system wakeup events so as to prevent system suspends
 55  * from happening while those events are being processed.
 56  *
 57  * Assuming neither EPOLLET nor EPOLLONESHOT is set, system suspends will not be
 58  * re-allowed until epoll_wait is called again after consuming the wakeup
 59  * event(s).
 60  *
 61  * Requires CAP_BLOCK_SUSPEND
 62  */
 63 #define EPOLLWAKEUP     ((__force __poll_t)(1U << 29))
 64 
 65 /* Set the One Shot behaviour for the target file descriptor */
 66 #define EPOLLONESHOT    ((__force __poll_t)(1U << 30))
 67 
 68 /* Set the Edge Triggered behaviour for the target file descriptor */
 69 #define EPOLLET         ((__force __poll_t)(1U << 31))
 70 
 71 /* 
 72  * On x86-64 make the 64bit structure have the same alignment as the
 73  * 32bit structure. This makes 32bit emulation easier.
 74  *
 75  * UML/x86_64 needs the same packing as x86_64
 76  */
 77 #ifdef __x86_64__
 78 #define EPOLL_PACKED __attribute__((packed))
 79 #else
 80 #define EPOLL_PACKED
 81 #endif
 82 
 83 struct epoll_event {
 84         __poll_t events;
 85         __u64 data;
 86 } EPOLL_PACKED;
 87 
 88 struct epoll_params {
 89         __u32 busy_poll_usecs;
 90         __u16 busy_poll_budget;
 91         __u8 prefer_busy_poll;
 92 
 93         /* pad the struct to a multiple of 64bits */
 94         __u8 __pad;
 95 };
 96 
 97 #define EPOLL_IOC_TYPE 0x8A
 98 #define EPIOCSPARAMS _IOW(EPOLL_IOC_TYPE, 0x01, struct epoll_params)
 99 #define EPIOCGPARAMS _IOR(EPOLL_IOC_TYPE, 0x02, struct epoll_params)
100 
101 #endif /* _UAPI_LINUX_EVENTPOLL_H */
102 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php