From d44f3904cf1fcb245b03a239071c684be4a9a13f Mon Sep 17 00:00:00 2001 From: zhushengle Date: Tue, 20 Apr 2021 09:25:36 +0800 Subject: [PATCH] fix:the setitimer signals the process to be locked at a fixed time. There is a static problem. Close #I3H7TO Change-Id: Iccfb458ed43f761fde1f943e0005f4ac1bf425bc --- compat/posix/src/time.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compat/posix/src/time.c b/compat/posix/src/time.c index 462ea7c0..ce5ca456 100755 --- a/compat/posix/src/time.c +++ b/compat/posix/src/time.c @@ -586,6 +586,7 @@ typedef struct { static VOID SwtmrProc(UINTPTR tmrArg) { + unsigned int intSave; int sig; pid_t pid; siginfo_t info; @@ -610,7 +611,10 @@ static VOID SwtmrProc(UINTPTR tmrArg) info.si_value.sival_ptr = arg->sigev_value.sival_ptr; /* Send the signal */ + SCHEDULER_LOCK(intSave); OsDispatch(pid, &info, OS_USER_KILL_PERMISSION); + SCHEDULER_UNLOCK(intSave); + return; } -- GitLab