summaryrefslogtreecommitdiff
path: root/components/lwp/lwp_syscall.c
diff options
context:
space:
mode:
authorzmq810150896 <[email protected]>2023-07-27 17:24:56 +0800
committerGitHub <[email protected]>2023-07-27 17:24:56 +0800
commit307e9e5e98675da7c1fa32f15ab4130ca5f73a8a (patch)
tree886b6eb2688c1fcc8f75fe2ebde5981bfc56ca8d /components/lwp/lwp_syscall.c
parent43b451b27ca17650615aabc34da1a00855233f83 (diff)
Add the system call eventfd (#7835)
Diffstat (limited to 'components/lwp/lwp_syscall.c')
-rw-r--r--components/lwp/lwp_syscall.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c
index 7f04271dac..3dc743b182 100644
--- a/components/lwp/lwp_syscall.c
+++ b/components/lwp/lwp_syscall.c
@@ -41,6 +41,7 @@
#include <sys/utsname.h>
#ifdef RT_USING_DFS
+#include <eventfd.h>
#include <poll.h>
#include <sys/select.h>
#include <dfs_file.h>
@@ -5317,6 +5318,14 @@ sysret_t sys_symlink(const char *existing, const char *new)
return (ret < 0 ? GET_ERRNO() : ret);
}
+sysret_t sys_eventfd2(unsigned int count, int flags)
+{
+ int ret;
+
+ ret = eventfd(count, flags);
+ return (ret < 0 ? GET_ERRNO() : ret);
+}
+
static const struct rt_syscall_def func_table[] =
{
SYSCALL_SIGN(sys_exit), /* 01 */
@@ -5548,6 +5557,7 @@ static const struct rt_syscall_def func_table[] =
SYSCALL_SIGN(sys_sigtimedwait),
SYSCALL_SIGN(sys_notimpl),
SYSCALL_SIGN(sys_notimpl), /* 190 */
+ SYSCALL_SIGN(sys_eventfd2),
};
const void *lwp_get_sys_api(rt_uint32_t number)