You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/01/26 15:11:43 UTC

[nuttx] branch master updated: epoll.h: Add u64 field like Linux

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new f9836c94fb epoll.h: Add u64 field like Linux
f9836c94fb is described below

commit f9836c94fb13b3123a002a18fd9a1d29bcfb09e3
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Jan 22 03:49:11 2023 +0800

    epoll.h: Add u64 field like Linux
    
    https://man7.org/linux/man-pages/man2/epoll_wait.2.html
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/sys/epoll.h | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/sys/epoll.h b/include/sys/epoll.h
index 2652b8d8af..e9f9405467 100644
--- a/include/sys/epoll.h
+++ b/include/sys/epoll.h
@@ -40,6 +40,9 @@
  * Included Files
  ****************************************************************************/
 
+#include <nuttx/config.h>
+#include <nuttx/compiler.h>
+
 #include <poll.h>
 #include <fcntl.h>
 
@@ -91,12 +94,17 @@ enum
 #define EPOLL_CLOEXEC EPOLL_CLOEXEC
 };
 
-typedef union poll_data
+union epoll_data
 {
   FAR void    *ptr;
   int          fd;
   uint32_t     u32;
-} epoll_data_t;
+#ifdef CONFIG_HAVE_LONG_LONG
+  uint64_t     u64;
+#endif
+};
+
+typedef union epoll_data epoll_data_t;
 
 struct epoll_event
 {