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