From f68d32c9f4b2f46d26d96839801d1888a93f93ed Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期四, 18 一月 2024 14:25:29 +0800
Subject: [PATCH] less memory

---
 src/futex_sem.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/futex_sem.cpp b/src/futex_sem.cpp
index 226145f..8a0fd33 100644
--- a/src/futex_sem.cpp
+++ b/src/futex_sem.cpp
@@ -1,8 +1,10 @@
 #include "futex_sem.h"
-
+#include "time_util.h"
 
 int futex(int *uaddr, int futex_op, int val,
     const struct timespec *timeout, int *uaddr2, int val3)
 {
-  return syscall(SYS_futex, uaddr, futex_op, val, timeout, uaddr, val3);
+
+	const struct timespec ts = TimeUtil::trim_time(timeout);
+  return syscall(SYS_futex, uaddr, futex_op, val, &ts, uaddr, val3);
 }
\ No newline at end of file

--
Gitblit v1.8.0