mirror of https://github.com/RT-Thread/rt-thread
🐞 fix(mempool): fix assert (#8364)
This commit is contained in:
parent
b8d1d671a9
commit
6be74e227e
|
@ -16,6 +16,7 @@
|
||||||
* 2012-03-22 Bernard fix align issue in rt_mp_init and rt_mp_create.
|
* 2012-03-22 Bernard fix align issue in rt_mp_init and rt_mp_create.
|
||||||
* 2022-01-07 Gabriel Moving __on_rt_xxxxx_hook to mempool.c
|
* 2022-01-07 Gabriel Moving __on_rt_xxxxx_hook to mempool.c
|
||||||
* 2023-09-15 xqyjlj perf rt_hw_interrupt_disable/enable
|
* 2023-09-15 xqyjlj perf rt_hw_interrupt_disable/enable
|
||||||
|
* 2023-12-10 xqyjlj fix spinlock assert
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
|
@ -290,12 +291,13 @@ rt_err_t rt_mp_delete(rt_mp_t mp)
|
||||||
rt_thread_resume(thread);
|
rt_thread_resume(thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rt_spin_unlock_irqrestore(&(mp->spinlock), level);
|
||||||
|
|
||||||
/* release allocated room */
|
/* release allocated room */
|
||||||
rt_free(mp->start_address);
|
rt_free(mp->start_address);
|
||||||
|
|
||||||
/* detach object */
|
/* detach object */
|
||||||
rt_object_delete(&(mp->parent));
|
rt_object_delete(&(mp->parent));
|
||||||
rt_spin_unlock_irqrestore(&(mp->spinlock), level);
|
|
||||||
|
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue