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

Merge pull request #16899 from kaspar030/queue_msg_thread_flags_yield_v2

core/msg: yield after thread_flags_wake() in queue_msg()
This commit is contained in:
Kaspar Schleiser 2022-05-06 19:04:19 +02:00 committed by GitHub
commit ebdcccbd99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;