meso: Implement LightSession functions

This commit is contained in:
TuxSH authored and Michael Scire committed 2019-06-03 17:41:08 -07:00
1 parent be3550d382
commit acf32f841c
8 files changed
+177 -18

No files matched your search

+19
View File
@@ -85,6 +85,13 @@ void KThread::ResumeFromKernelSync()
Reschedule(SchedulingStatus::Running);
}
void KThread::ResumeFromKernelSync(Result res)
{
// Has to be called from critical section
syncResult = res;
ResumeFromKernelSync();
}
void KThread::ResumeAllFromKernelSync(KThread::WaitList &waitList)
{
// Has to be called from critical section
@@ -96,6 +103,18 @@ void KThread::ResumeAllFromKernelSync(KThread::WaitList &waitList)
);
}
void KThread::ResumeAllFromKernelSync(KThread::WaitList &waitList, Result res)
{
// Has to be called from critical section
waitList.clear_and_dispose(
[res](KThread *t) {
t->syncResult = res;
t->currentWaitList = nullptr;
t->Reschedule(SchedulingStatus::Running);
}
);
}
void KThread::CancelKernelSync()
{
KScopedCriticalSection criticalSection;