kern: implement SvcCreateEvent, SvcSignalEvent, SvcClearEvent, SvcResetSignal

This commit is contained in:
Michael Scire 2020-07-14 02:45:06 -07:00 committed by SciresM
parent 93be2ffcba
commit b35380a942
5 changed files with 121 additions and 9 deletions

View file

@ -435,6 +435,22 @@ namespace ams::kern {
return ResultSuccess();
}
Result KProcess::Reset() {
MESOSPHERE_ASSERT_THIS();
/* Lock the process and the scheduler. */
KScopedLightLock lk(this->state_lock);
KScopedSchedulerLock sl;
/* Validate that we're in a state that we can reset. */
R_UNLESS(this->state != State_Terminated, svc::ResultInvalidState());
R_UNLESS(this->is_signaled, svc::ResultInvalidState());
/* Clear signaled. */
this->is_signaled = false;
return ResultSuccess();
}
void KProcess::SetPreemptionState() {
MESOSPHERE_UNIMPLEMENTED();
}