diff --git a/compat/posix/src/time.c b/compat/posix/src/time.c index 92194f285912dfc6d64c87f1d10b764aedcfbb4a..71870721f83f0b6ce80d085c4aef5a0c61a5bc0e 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) {