mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
Kernel: Use Thread::from_tid() in more places
This commit is contained in:
@@ -794,11 +794,13 @@ void Thread::wake_from_queue()
|
||||
|
||||
Thread* Thread::from_tid(int tid)
|
||||
{
|
||||
ASSERT_INTERRUPTS_DISABLED();
|
||||
InterruptDisabler disabler;
|
||||
Thread* found_thread = nullptr;
|
||||
Thread::for_each([&](auto& thread) {
|
||||
if (thread.tid() == tid)
|
||||
if (thread.tid() == tid) {
|
||||
found_thread = &thread;
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
return found_thread;
|
||||
|
||||
Reference in New Issue
Block a user