fix: pthread_create内部逻辑时序调整

在线程创建成功后,pthread_create内部先将函数返回值设置好,再进行TaskResume就绪调度状态

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I795c115da612123b67f34cdc57e85eac955bbc08
This commit is contained in:
arvinzzz 2023-02-10 17:42:17 +08:00
parent e74deedba3
commit f038492dbc
1 changed files with 2 additions and 2 deletions

View File

@ -221,10 +221,10 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
LOS_ListAdd(&g_pthreadListHead, &pthreadData->threadList);
LOS_IntRestore(intSave);
(void)LOS_TaskResume(taskID);
*thread = (pthread_t)taskID;
(void)LOS_TaskResume(taskID);
return 0;
}