mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
Merge pull request #18955 from maribu/core/mbox/fix-race
core/mbox: fix race condition
This commit is contained in:
commit
ad5f02d119
@ -73,7 +73,7 @@ int _mbox_put(mbox_t *mbox, msg_t *msg, int blocking)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (cib_full(&mbox->cib)) {
|
while (cib_full(&mbox->cib)) {
|
||||||
if (blocking) {
|
if (blocking) {
|
||||||
_wait(&mbox->writers, irqstate);
|
_wait(&mbox->writers, irqstate);
|
||||||
irqstate = irq_disable();
|
irqstate = irq_disable();
|
||||||
|
Loading…
Reference in New Issue
Block a user