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) {