This commit is contained in:
Meco Man 2021-01-04 22:34:50 +08:00
parent 234f1aec99
commit cd6ca24f88
1 changed files with 8 additions and 3 deletions

View File

@ -1534,7 +1534,6 @@ rt_err_t rt_mb_send_wait(rt_mailbox_t mb,
if (mb->entry == mb->size && timeout == 0)
{
rt_hw_interrupt_enable(temp);
return -RT_EFULL;
}
@ -1678,6 +1677,12 @@ rt_err_t rt_mb_urgent(rt_mailbox_t mb, rt_ubase_t value)
/* disable interrupt */
temp = rt_hw_interrupt_disable();
if (mb->entry == mb->size)
{
rt_hw_interrupt_enable(temp);
return -RT_EFULL;
}
/* rewind to the previous position */
if (mb->out_offset > 0)
{