From 2e2ebb95ca2fad0e315dd458da59f7eb91e51d1a Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Thu, 13 Aug 2020 17:26:34 +0800 Subject: [PATCH] sys/poll/epoll: sync the epoll_event struct layout with pollfd epoll(2) call broken caused by 94fe5c834904c1c2c1dfbe9e29cd5efbc7f5b284 Change-Id: I0811bb7a756797651819d46236e26869559b1767 Signed-off-by: chao.an --- include/sys/epoll.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/sys/epoll.h b/include/sys/epoll.h index 28771cd47c..b94ef0a360 100644 --- a/include/sys/epoll.h +++ b/include/sys/epoll.h @@ -78,16 +78,22 @@ enum EPOLL_EVENTS typedef union poll_data { - FAR void *ptr; /* For use by drivers */ - int fd; /* The descriptor being polled */ + void *ptr; + int fd; + uint32_t u32; } epoll_data_t; struct epoll_event { epoll_data_t data; - 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 */ + + /* Non-standard fields used internally by NuttX. */ + + void *reserved; /* reserved feild sync with struct pollfd */ + FAR sem_t *sem; /* Pointer to semaphore used to post output event */ + FAR void *priv; /* For use by drivers */ }; struct epoll_head