mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 18:57:16 +08:00
[kernel] add assert to module object
This commit is contained in:
@@ -1182,6 +1182,7 @@ rt_err_t rt_module_destroy(rt_module_t module)
|
||||
/* check parameter */
|
||||
RT_ASSERT(module != RT_NULL);
|
||||
RT_ASSERT(module->nref == 0);
|
||||
RT_ASSERT(rt_object_get_type(&module->parent) == RT_Object_Class_Module);
|
||||
|
||||
RT_DEBUG_LOG(RT_DEBUG_MODULE, ("rt_module_destroy: %8.*s\n",
|
||||
RT_NAME_MAX, module->parent.name));
|
||||
|
||||
Reference in New Issue
Block a user