1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core/msg: yield after thread_flags_wake() in queue_msg()

This commit is contained in:
Kaspar Schleiser 2021-09-27 20:35:00 +02:00
parent e64b1bd764
commit 0c87335a45

View File

@ -119,7 +119,10 @@ static int _msg_send(msg_t *m, kernel_pid_t target_pid, bool block,
" has a msg_queue. Queueing message.\n", RIOT_FILE_RELATIVE,
__LINE__, target_pid);
irq_restore(state);
if (me->status == STATUS_REPLY_BLOCKED) {
if (me->status == STATUS_REPLY_BLOCKED
|| (IS_USED(MODULE_CORE_THREAD_FLAGS) &&
sched_context_switch_request)
) {
thread_yield_higher();
}
return 1;