kern: implement KProcess::Run

This commit is contained in:
Michael Scire committed 2020-02-19 19:38:20 -08:00
1 parent 28ea0b12a8
commit c568788609
25 files changed
+516 -33

No files matched your search

@@ -111,12 +111,15 @@ namespace ams::kern {
class KScopedPageGroup {
private:
KPageGroup *group;
const KPageGroup *group;
public:
explicit ALWAYS_INLINE KScopedPageGroup(KPageGroup *gp) : group(gp) { group->Open(); }
explicit ALWAYS_INLINE KScopedPageGroup(KPageGroup &gp) : KScopedPageGroup(std::addressof(gp)) { /* ... */ }
ALWAYS_INLINE ~KScopedPageGroup() { group->Close(); }
explicit ALWAYS_INLINE KScopedPageGroup(const KPageGroup *gp) : group(gp) { if (this->group) { this->group->Open(); } }
explicit ALWAYS_INLINE KScopedPageGroup(const KPageGroup &gp) : KScopedPageGroup(std::addressof(gp)) { /* ... */ }
ALWAYS_INLINE ~KScopedPageGroup() { if (this->group) { this->group->Close(); } }
ALWAYS_INLINE void CancelClose() {
this->group = nullptr;
}
};
}