提交 90c71e3e 编写于 作者: A arvinzzz 提交者: Zhaotianyu

fixed f038492d from https://gitee.com/arvinzzz/kernel_liteos_m/pulls/1023

fix: pthread_create内部逻辑时序调整

在线程创建成功后,pthread_create内部先将函数返回值设置好,再进行TaskResume就绪调度状态
Signed-off-by: Narvinzzz <zhaotianyu9@huawei.com>
Change-Id: I795c115da612123b67f34cdc57e85eac955bbc08
上级 41764596
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册