1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 10:12:45 +01:00

Merge pull request #18955 from maribu/core/mbox/fix-race

core/mbox: fix race condition
This commit is contained in:
Kaspar Schleiser 2022-11-23 13:09:13 +01:00 committed by GitHub
commit ad5f02d119
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();