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

1.修改:
compat/posix/src/time.c文件中clock_gettime接口ESRCH返回值为EINVAL.
2.影响:
无.

fix #I3OUHI

Signed-off-by: teamol <28105285@qq.com>
This commit is contained in:
teamol 2021-06-18 10:41:41 +08:00
parent 9169637084
commit f8cf6e6439
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) {