提交 50a97669 编写于 作者: B BernardXiong

[Kernel] Add object re-initialization check.

上级 b1a98ebe
......@@ -251,6 +251,9 @@ void rt_object_init(struct rt_object *object,
/* initialize object's parameters */
/* check object type to avoid re-initialization */
RT_ASSERT(object->type != (type | RT_Object_Class_Static));
/* set object type to static */
object->type = type | RT_Object_Class_Static;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册