summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-06-10 18:46:11 +0800
committerBernard Xiong <[email protected]>2018-06-10 18:46:11 +0800
commitdf64a297abaf382d21aedbf7bf8b8e52e1c774a5 (patch)
tree323d24995a5e3e2ad2671ba070e586ecea182273 /src/ipc.c
parent564df04da1e0d0e7e3ac374fc7c3a51f2b0dba21 (diff)
[Kernel] Remove memory ops when SLAB and module enable
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/ipc.c b/src/ipc.c
index 5aed193996..055c8cb2e4 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1380,15 +1380,8 @@ rt_err_t rt_mb_delete(rt_mailbox_t mb)
/* also resume all mailbox private suspended thread */
rt_ipc_list_resume_all(&(mb->suspend_sender_thread));
-#if defined(RT_USING_MODULE) && defined(RT_USING_SLAB)
- /* the mb object belongs to an application module */
- if (mb->parent.parent.flag & RT_OBJECT_FLAG_MODULE)
- rt_module_free(mb->parent.parent.module_id, mb->msg_pool);
- else
-#endif
-
- /* free mailbox pool */
- RT_KERNEL_FREE(mb->msg_pool);
+ /* free mailbox pool */
+ RT_KERNEL_FREE(mb->msg_pool);
/* delete mailbox object */
rt_object_delete(&(mb->parent.parent));
@@ -1900,15 +1893,8 @@ rt_err_t rt_mq_delete(rt_mq_t mq)
/* resume all suspended thread */
rt_ipc_list_resume_all(&(mq->parent.suspend_thread));
-#if defined(RT_USING_MODULE) && defined(RT_USING_SLAB)
- /* the mq object belongs to an application module */
- if (mq->parent.parent.flag & RT_OBJECT_FLAG_MODULE)
- rt_module_free(mq->parent.parent.module_id, mq->msg_pool);
- else
-#endif
-
- /* free message queue pool */
- RT_KERNEL_FREE(mq->msg_pool);
+ /* free message queue pool */
+ RT_KERNEL_FREE(mq->msg_pool);
/* delete message queue object */
rt_object_delete(&(mq->parent.parent));