Kernel: Correct Signal on Thread Death and Setup Sync Objects on Thread for Debugging
This commit is contained in:
parent
75e10578f1
commit
b4dc01f16a
3 changed files with 17 additions and 15 deletions
|
@ -70,6 +70,8 @@ std::pair<ResultCode, Handle> Synchronization::WaitFor(
|
|||
for (auto& object : sync_objects) {
|
||||
object->AddWaitingThread(SharedFrom(thread));
|
||||
}
|
||||
|
||||
thread->SetSynchronizationObjects(&sync_objects);
|
||||
thread->SetSynchronizationResults(nullptr, RESULT_TIMEOUT);
|
||||
thread->SetStatus(ThreadStatus::WaitSynch);
|
||||
}
|
||||
|
@ -83,6 +85,7 @@ std::pair<ResultCode, Handle> Synchronization::WaitFor(
|
|||
SchedulerLock lock(kernel);
|
||||
ResultCode signaling_result = thread->GetSignalingResult();
|
||||
SynchronizationObject* signaling_object = thread->GetSignalingObject();
|
||||
thread->SetSynchronizationObjects(nullptr);
|
||||
for (auto& obj : sync_objects) {
|
||||
obj->RemoveWaitingThread(SharedFrom(thread));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue