提交 f68bb0ec 编写于 作者: B Bernard Xiong

[pthreads] Fix the object check issue.

上级 6f012541
......@@ -109,6 +109,7 @@ int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
/* detach the object from system object container */
rt_object_detach(&(cond->sem.parent.parent));
cond->sem.parent.parent.type = RT_Object_Class_Semaphore;
return 0;
}
......
......@@ -141,6 +141,7 @@ int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
/* detach the object from system object container */
rt_object_detach(&(mutex->lock.parent.parent));
mutex->lock.parent.parent.type = RT_Object_Class_Mutex;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册