Skip to content

Commit

Permalink
Fix a bug in thread exits.
Browse files Browse the repository at this point in the history
The priority map was not updated so if the highest-priority thread
exited then the next thread would not become runnable.
  • Loading branch information
davidchisnall authored and nwf committed Dec 18, 2024
1 parent ce9e047 commit c633c64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sdk/core/scheduler/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ namespace
{
Debug::log("Thread exited, {} threads remaining", threadCount - 1);
current->list_remove(&priorityList[current->priority]);
current->priority_map_remove();
current->state = ThreadState::Exited;
return (--threadCount) == 0;
}
Expand Down

0 comments on commit c633c64

Please sign in to comment.