mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 11:55:12 +00:00
Kernel: Use Thread::from_tid() in more places
This commit is contained in:
parent
95ba0d5a02
commit
3a27790fa7
2 changed files with 16 additions and 53 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue