You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/12/19 07:41:22 UTC

[incubator-nuttx] 04/05: eventfd: Typedef eventfd_t to uint64_t on the supported platform

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

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

commit 54e1c27e43946ed4f1f95711a6e9312ef35e8cf2
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Dec 18 21:37:58 2021 +0800

    eventfd: Typedef eventfd_t to uint64_t on the supported platform
    
    to compliant with Linux implementation as much as possible
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/sys/eventfd.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/sys/eventfd.h b/include/sys/eventfd.h
index 45a6753..6ed305a 100644
--- a/include/sys/eventfd.h
+++ b/include/sys/eventfd.h
@@ -42,7 +42,11 @@
 
 /* Type for event counter */
 
+#ifdef __INT64_DEFINED
+typedef uint64_t eventfd_t;
+#else
 typedef uint32_t eventfd_t;
+#endif
 
 /****************************************************************************
  * Public Function Prototypes