diff options
| author | Joe Damato <jdamato@fastly.com> | 2024-05-29 06:49:59 +0000 | 
|---|---|---|
| committer | Rich Felker <dalias@aerifal.cx> | 2024-06-22 16:53:06 -0400 | 
| commit | 1b97d0060ba585df41f0a55a1f8c33c704d0dfbe (patch) | |
| tree | e66e6216c4f146dac0acb6ce5459811a19500db3 | |
| parent | ab31e9d6a0fa7c5c408856c89df2dfb12c344039 (diff) | |
| download | musl-1b97d0060ba585df41f0a55a1f8c33c704d0dfbe.tar.gz | |
sys/epoll.h: add epoll ioctls
add two ioctls to get and set struct epoll_params to allow users to
control epoll based busy polling of network sockets.
added to uapi in commit 18e2bf0edf4dd88d9656ec92395aa47392e85b61 (Linux
kernel 6.9 and newer).
| -rw-r--r-- | include/sys/epoll.h | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sys/epoll.h b/include/sys/epoll.h index ac81a841..5f975c4a 100644 --- a/include/sys/epoll.h +++ b/include/sys/epoll.h @@ -7,6 +7,7 @@ extern "C" {  #include <stdint.h>  #include <sys/types.h> +#include <sys/ioctl.h>  #include <fcntl.h>  #define __NEED_sigset_t @@ -54,6 +55,17 @@ __attribute__ ((__packed__))  #endif  ; +struct epoll_params { +	uint32_t busy_poll_usecs; +	uint16_t busy_poll_budget; +	uint8_t prefer_busy_poll; + +	uint8_t __pad; +}; + +#define EPOLL_IOC_TYPE 0x8A +#define EPIOCSPARAMS _IOW(EPOLL_IOC_TYPE, 0x01, struct epoll_params) +#define EPIOCGPARAMS _IOR(EPOLL_IOC_TYPE, 0x02, struct epoll_params)  int epoll_create(int);  int epoll_create1(int);  | 
