Skip to content
Snippets Groups Projects
  • Lioncash's avatar
    kernel/thread: Amend condition within UpdatePriority() · 39483b92
    Lioncash authored
    This condition was checking against the nominal thread priority, whereas
    the kernel itself checks against the current priority instead. We were
    also assigning the nominal priority, when we should be assigning
    current_priority, which takes priority inheritance into account.
    
    This can lead to the incorrect priority being assigned to a thread.
    
    Given we recursively update the relevant threads, we don't need to go
    through the whole mutex waiter list. This matches what the kernel does
    as well (only accessing the first entry within the waiting list).
    39483b92