Debian Codegraph @

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

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