Revise PID and TID generation to align with standards

This commit is contained in:
EnderIce2
2024-03-02 00:51:06 +02:00
parent 525a102f20
commit d3a16469ad
9 changed files with 27 additions and 20 deletions

View File

@ -155,15 +155,12 @@ namespace Tasking::Scheduler
return nullptr;
}
TCB *Custom::GetThreadByID(TID ID)
TCB *Custom::GetThreadByID(TID ID, PCB *Parent)
{
foreach (auto p in ProcessList)
foreach (auto t in Parent->Threads)
{
foreach (auto t in p->Threads)
{
if (t->ID == ID)
return t;
}
if (t->ID == ID)
return t;
}
return nullptr;
}