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 <anchao@xiaomi.com>
This commit is contained in:
chao.an 2020-08-11 21:44:57 +08:00 committed by Xiang Xiao
parent f97b8436b3
commit 155860ad15

View File

@ -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