Implement KSynchronizationObject

This commit is contained in:
TuxSH
2018-11-04 18:51:27 +01:00
committed by Michael Scire
parent 1684e1d35c
commit 7fde5fbe40
6 changed files with 82 additions and 3 deletions

View File

@@ -120,6 +120,15 @@ void KThread::CancelKernelSync(Result res)
CancelKernelSync();
}
void KThread::HandleSyncObjectSignaled(KSynchronizationObject *syncObj)
{
if (GetSchedulingStatus() == SchedulingStatus::Paused) {
signaledSyncObject = syncObj;
syncResult = ResultSuccess{};
Reschedule(SchedulingStatus::Running);
}
}
void KThread::AddToMutexWaitList(KThread &thread)
{
// TODO: check&increment numKernelMutexWaiters