kern: implement SvcGetThreadContext3

This commit is contained in:
Michael Scire 2020-07-28 03:56:47 -07:00
commit cffc85ec2d
7 changed files with 139 additions and 3 deletions

View file

@ -270,6 +270,11 @@ namespace ams::kern {
return this->GetStackParameters().is_in_exception_handler;
}
ALWAYS_INLINE bool IsCallingSvc() const {
MESOSPHERE_ASSERT_THIS();
return this->GetStackParameters().is_calling_svc;
}
ALWAYS_INLINE void RegisterDpc(DpcFlag flag) {
this->GetStackParameters().dpc_flags |= flag;
}
@ -455,6 +460,7 @@ namespace ams::kern {
void Continue();
Result SetActivity(ams::svc::ThreadActivity activity);
Result GetThreadContext3(ams::svc::ThreadContext *out);
void ContinueIfHasKernelWaiters() {
if (this->GetNumKernelWaiters() > 0) {