Thread: Implement priority boost for starved threads.
SVC: Return correct error code on invalid CreateThread processor ID. SVC: Assert when creating a thread with an invalid userland priority.
This commit is contained in:
parent
ee3377b67d
commit
7b9f428b23
5 changed files with 92 additions and 28 deletions
|
@ -46,6 +46,13 @@ template<ResultCode func(u32*, u32, u32, u32, u32, u32)> void Wrap(){
|
|||
FuncReturn(retval);
|
||||
}
|
||||
|
||||
template<ResultCode func(u32*, s32, u32, u32, u32, s32)> void Wrap() {
|
||||
u32 param_1 = 0;
|
||||
u32 retval = func(¶m_1, PARAM(0), PARAM(1), PARAM(2), PARAM(3), PARAM(4)).raw;
|
||||
Core::g_app_core->SetReg(1, param_1);
|
||||
FuncReturn(retval);
|
||||
}
|
||||
|
||||
template<ResultCode func(s32*, u32*, s32, bool, s64)> void Wrap() {
|
||||
s32 param_1 = 0;
|
||||
s32 retval = func(¶m_1, (Handle*)Memory::GetPointer(PARAM(1)), (s32)PARAM(2),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue