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:
commit
89d337073d
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user