mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-15 07:34:23 -04:00
kern: implement SvcCreateEvent, SvcSignalEvent, SvcClearEvent, SvcResetSignal
This commit is contained in:
parent
93be2ffcba
commit
b35380a942
5 changed files with 121 additions and 9 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue