From 155860ad151967f7344769b2835042dfbbc4e5c1 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Tue, 11 Aug 2020 21:44:57 +0800 Subject: [PATCH] sys/epoll: move the private handle to epoll_data_t sync the struct epoll_event define with linux: Linux Programmer's Manual: DESCRIPTION EPOLL_CTL_DEL ... The event argument describes the object linked to the file descriptor fd. The struct epoll_event is defined as: typedef union epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } epoll_data_t; struct epoll_event { uint32_t events; /* Epoll events */ epoll_data_t data; /* User data variable */ }; https: //man7.org/linux/man-pages/man2/epoll_ctl.2.html Change-Id: I3ad447b485fd331190e461a198ef7c39301eb1bb Signed-off-by: chao.an --- include/sys/epoll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/epoll.h b/include/sys/epoll.h index 672dc1901a2..28771cd47c7 100644 --- a/include/sys/epoll.h +++ b/include/sys/epoll.h @@ -78,6 +78,7 @@ enum EPOLL_EVENTS typedef union poll_data { + FAR void *ptr; /* For use by drivers */ int fd; /* The descriptor being polled */ } epoll_data_t; @@ -87,7 +88,6 @@ struct epoll_event FAR sem_t *sem; /* Pointer to semaphore used to post output event */ pollevent_t events; /* The input event flags */ pollevent_t revents; /* The output event flags */ - FAR void *priv; /* For use by drivers */ }; struct epoll_head