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

Merge pull request #20890 from maribu/core/mutex/thread_yield

core/mutex: use thread_yield_higher() in mutex_unlock()
This commit is contained in:
benpicco 2024-10-07 11:22:32 +00:00 committed by GitHub
commit 89d337073d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -216,8 +216,6 @@ void mutex_unlock(mutex_t *mutex)
mutex->queue.next = MUTEX_LOCKED;
}
uint16_t process_priority = process->priority;
#if IS_USED(MODULE_CORE_MUTEX_PRIORITY_INHERITANCE)
thread_t *owner = thread_get(mutex->owner);
if ((owner) && (owner->priority != mutex->owner_original_priority)) {
@ -232,7 +230,7 @@ void mutex_unlock(mutex_t *mutex)
#endif
irq_restore(irqstate);
sched_switch(process_priority);
thread_yield_higher();
}
void mutex_unlock_and_sleep(mutex_t *mutex)