!328 fix:修改clock_gettime接口适配posix标准测试用例011输入clk_id错误时返回值ESRCH为EINVAL.
Merge pull request !328 from guweijie/master
This commit is contained in:
commit
5f970888ef
|
@ -459,8 +459,9 @@ static int PthreadGetCputime(clockid_t clockID, struct timespec *ats)
|
||||||
UINT32 tid = ((UINT32) ~((clockID) >> CPUCLOCK_ID_OFFSET));
|
UINT32 tid = ((UINT32) ~((clockID) >> CPUCLOCK_ID_OFFSET));
|
||||||
|
|
||||||
if (OS_TID_CHECK_INVALID(tid)) {
|
if (OS_TID_CHECK_INVALID(tid)) {
|
||||||
return -ESRCH;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LosTaskCB *task = OsGetTaskCB(tid);
|
LosTaskCB *task = OsGetTaskCB(tid);
|
||||||
|
|
||||||
if (OsCurrTaskGet()->processID != task->processID) {
|
if (OsCurrTaskGet()->processID != task->processID) {
|
||||||
|
|
Loading…
Reference in New Issue