—
NAME
epoll_event, epoll_data, epoll_data_t - epoll event
LIBRARY
Standard C library (libc)
SYNOPSIS
bash
#include <sys/epoll.h>bash
struct epoll_event {\n
\n uint32_t events;\n /* Epoll events */
\n epoll_data_t data;\n /* User data variable */
\n};bash
union epoll_data {\n
\n void *ptr;\n
\n int fd;\n
\n uint32_t u32;\n
\n uint64_t u64;\n
\n};bash
typedef union epoll_data epoll_data_t;\nDESCRIPTION
The epoll_event structure specifies data that the kernel should save and return when the corresponding file descriptor becomes ready.
VERSIONS
C library/kernel differences
The Linux kernel headers also provide this type, with a slightly different definition:
bash
#include <linux/eventpoll.h>
struct epoll_event {
\n
__poll_t events;
\n
__u64 data;
};STANDARDS
Linux.
SEE ALSO
epoll_wait(2), epoll_ctl(2)