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

@ -39,7 +39,7 @@ namespace ams::kern::svc {
R_UNLESS(ams::svc::HighestThreadPriority <= priority && priority <= ams::svc::LowestThreadPriority, svc::ResultInvalidPriority());
R_UNLESS(process.CheckThreadPriority(priority), svc::ResultInvalidPriority());
/* Reserve a new session from the process resource limit (waiting up to 100ms). */
/* Reserve a new thread from the process resource limit (waiting up to 100ms). */
KScopedResourceReservation thread_reservation(std::addressof(process), ams::svc::LimitableResource_ThreadCountMax, 1, KHardwareTimer::GetTick() + ams::svc::Tick(TimeSpan::FromMilliSeconds(100)));
R_UNLESS(thread_reservation.Succeeded(), svc::ResultLimitReached());