aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-06-20 00:57:58 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-06-20 00:57:58 +0200
commit7af7e2ae1565c80da409db84099cf266a79a94be (patch)
tree3fe49b3657fc86dffa3d9742dfa8e0f8d3be5f81
parenta1d6bf1ea911278ca5bcbdfc4df12b40f350d74d (diff)
downloadman-pages-7af7e2ae1565c80da409db84099cf266a79a94be.tar.gz
epoll_event.3type: Add new page documenting 'struct epoll_event'
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--man3/epoll_event.3type55
1 files changed, 55 insertions, 0 deletions
diff --git a/man3/epoll_event.3type b/man3/epoll_event.3type
new file mode 100644
index 0000000000..8d664c316f
--- /dev/null
+++ b/man3/epoll_event.3type
@@ -0,0 +1,55 @@
+.\" Copyright (c) 2022 by Alejandro Colomar <colomar.6.4.3@gmail.com>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\"
+.TH EPOLL_EVENT 3type 2022-06-19 Linux "Linux Programmer's Manual"
+.SH NAME
+epoll_event
+\- epoll event
+.SH LIBRARY
+Standard C library
+.RI ( libc )
+.SH SYNOPSIS
+.nf
+.B #include <sys/epoll.h>
+.PP
+.B struct epoll_event {
+.BR " uint32_t events;" " /* Epoll events */"
+.BR " epoll_data_t data;" " /* User data variable */"
+.B };
+.PP
+.B union epoll_data {
+.B " void *ptr;"
+.B " int fd;"
+.B " uint32_t u32;"
+.B " uint64_t u64;"
+.B };
+.PP
+.B "typedef union epoll_data epoll_data_t;"
+.fi
+.SH DESCRIPTION
+The
+.I epoll_event
+structure specifies data that the kernel should save and
+return when the corresponding file descriptor becomes ready.
+.SH CONFORMING TO
+This type is Linux-specific.
+.SH NOTES
+.SS C library/kernel differences
+The Linux kernel headers also provide this type,
+with a slightly different definition:
+.PP
+.in +4n
+.EX
+#include <linux/eventpoll.h>
+
+struct epoll_event {
+ __poll_t events;
+ __u64 data;
+};
+.EE
+.in
+.SH SEE ALSO
+.BR epoll_wait (2),
+.BR epoll_ctl (7)