This commit is contained in:
Meco Man 2021-01-05 09:20:53 +08:00
parent cd6ca24f88
commit 3f9b3f57ea
1 changed files with 2 additions and 10 deletions

View File

@ -1696,16 +1696,8 @@ rt_err_t rt_mb_urgent(rt_mailbox_t mb, rt_ubase_t value)
/* set ptr */
mb->msg_pool[mb->out_offset] = value;
if (mb->entry < RT_MB_ENTRY_MAX)
{
/* increase message entry */
mb->entry ++;
}
else
{
rt_hw_interrupt_enable(temp); /* enable interrupt */
return -RT_EFULL; /* value overflowed */
}
/* increase message entry */
mb->entry ++;
/* resume suspended thread */
if (!rt_list_isempty(&mb->parent.suspend_thread))