!328 fix:修改clock_gettime接口适配posix标准测试用例011输入clk_id错误时返回值ESRCH为EINVAL.

Merge pull request !328 from guweijie/master
This commit is contained in:
openharmony_ci 2021-06-18 14:26:29 +08:00 committed by Gitee
commit 5f970888ef
1 changed files with 2 additions and 1 deletions

View File

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