Debian Codegraph @

upstream/debian-unstable/man3/epoll_event.3type

raw
1 .\" Copyright, the authors of the Linux man-pages project
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .TH epoll_event 3type 2025-05-17 "Linux man-pages 6.18"
6 .SH NAME
7 epoll_event, epoll_data, epoll_data_t
8 \- epoll event
9 .SH LIBRARY
10 Standard C library
11 .RI ( libc )
12 .SH SYNOPSIS
13 .EX
14 .B #include <sys/epoll.h>
15 .P
16 .B struct epoll_event {
17 .BR " uint32_t events;" " /* Epoll events */"
18 .BR " epoll_data_t data;" " /* User data variable */"
19 .B };
20 .P
21 .B union epoll_data {
22 .B " void *ptr;"
23 .B " int fd;"
24 .B " uint32_t u32;"
25 .B " uint64_t u64;"
26 .B };
27 .P
28 .B "typedef union epoll_data epoll_data_t;"
29 .EE
30 .SH DESCRIPTION
31 The
32 .I epoll_event
33 structure specifies data that the kernel should save and
34 return when the corresponding file descriptor becomes ready.
35 .SH VERSIONS
36 .SS C library/kernel differences
37 The Linux kernel headers also provide this type,
38 with a slightly different definition:
39 .P
40 .in +4n
41 .EX
42 #include <linux/eventpoll.h>
43 \&
44 struct epoll_event {
45 __poll_t events;
46 __u64 data;
47 };
48 .EE
49 .in
50 .SH STANDARDS
51 Linux.
52 .SH SEE ALSO
53 .BR epoll_wait (2),
54 .BR epoll_ctl (2)