From c479ef57baaaa28964fc3ec8d80ff99dffa7d49f Mon Sep 17 00:00:00 2001 From: fujuntang <fujuntang@smartai.com> Date: 星期三, 10 十一月 2021 09:49:29 +0800 Subject: [PATCH] Fix the system hang issue when the app is killed contantly. --- 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