From f8cf6e6439ee017fe8e0d4ecfc9949c28fa6775f Mon Sep 17 00:00:00 2001 From: teamol <28105285@qq.com> Date: Fri, 18 Jun 2021 10:41:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9clock=5Fgettime?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=80=82=E9=85=8Dposix=E6=A0=87=E5=87=86?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B011=E8=BE=93=E5=85=A5clk=5F?= =?UTF-8?q?id=E9=94=99=E8=AF=AF=E6=97=B6=E8=BF=94=E5=9B=9E=E5=80=BCESRCH?= =?UTF-8?q?=E4=B8=BAEINVAL.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.修改: compat/posix/src/time.c文件中clock_gettime接口ESRCH返回值为EINVAL. 2.影响: 无. fix #I3OUHI Signed-off-by: teamol <28105285@qq.com> --- compat/posix/src/time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compat/posix/src/time.c b/compat/posix/src/time.c index 92194f28..71870721 100644 --- a/compat/posix/src/time.c +++ b/compat/posix/src/time.c @@ -459,8 +459,9 @@ static int PthreadGetCputime(clockid_t clockID, struct timespec *ats) UINT32 tid = ((UINT32) ~((clockID) >> CPUCLOCK_ID_OFFSET)); if (OS_TID_CHECK_INVALID(tid)) { - return -ESRCH; + return -EINVAL; } + LosTaskCB *task = OsGetTaskCB(tid); if (OsCurrTaskGet()->processID != task->processID) {