svc: Implement svcGetProcessInfo

A fairly basic service function, which only appears to currently support
retrieving the process state. This also alters the ProcessStatus enum to
contain all of the values that a kernel process seems to be able of
reporting with regards to state.
This commit is contained in:
Lioncash
2018-10-13 14:31:46 -04:00
parent 1584fb6b38
commit 1c7a7ed79b
3 changed files with 50 additions and 4 deletions

View File

@ -77,6 +77,14 @@ void SvcWrap() {
FuncReturn(retval);
}
template <ResultCode func(u64*, u32, u32)>
void SvcWrap() {
u64 param_1 = 0;
u32 retval = func(&param_1, static_cast<u32>(Param(1)), static_cast<u32>(Param(2))).raw;
Core::CurrentArmInterface().SetReg(1, param_1);
FuncReturn(retval);
}
template <ResultCode func(u32, u64)>
void SvcWrap() {
FuncReturn(func(static_cast<u32>(Param(0)), Param(1)).raw);