提交 b277135f 编写于 作者: C CornerOfSkyline

Fix the sem init check bug in pthread.

上级 f8cf8341
......@@ -186,7 +186,7 @@ int sem_init(sem_t *sem, int pshared, unsigned int value)
rt_snprintf(name, sizeof(name), "psem%02d", psem_number++);
sem->sem = rt_sem_create(name, value, RT_IPC_FLAG_FIFO);
if (sem == RT_NULL)
if (sem->sem == RT_NULL)
{
rt_set_errno(ENOMEM);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册