mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-01 19:22:46 +01:00
Merge pull request #9739 from liamwhite/old-gcc-fix
kernel: fix compilation with older gcc
This commit is contained in:
commit
f3b532d091
2 changed files with 5 additions and 4 deletions
|
@ -203,23 +203,23 @@ Result KCapabilities::ProcessMapRegionCapability(const u32 cap, F f) {
|
||||||
|
|
||||||
Result KCapabilities::MapRegion_(const u32 cap, KPageTable* page_table) {
|
Result KCapabilities::MapRegion_(const u32 cap, KPageTable* page_table) {
|
||||||
// Map each region into the process's page table.
|
// Map each region into the process's page table.
|
||||||
R_RETURN(ProcessMapRegionCapability(
|
return ProcessMapRegionCapability(
|
||||||
cap, [](KMemoryRegionType region_type, KMemoryPermission perm) -> Result {
|
cap, [](KMemoryRegionType region_type, KMemoryPermission perm) -> Result {
|
||||||
// R_RETURN(page_table->MapRegion(region_type, perm));
|
// R_RETURN(page_table->MapRegion(region_type, perm));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}));
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Result KCapabilities::CheckMapRegion(KernelCore& kernel, const u32 cap) {
|
Result KCapabilities::CheckMapRegion(KernelCore& kernel, const u32 cap) {
|
||||||
// Check that each region has a physical backing store.
|
// Check that each region has a physical backing store.
|
||||||
R_RETURN(ProcessMapRegionCapability(
|
return ProcessMapRegionCapability(
|
||||||
cap, [&](KMemoryRegionType region_type, KMemoryPermission perm) -> Result {
|
cap, [&](KMemoryRegionType region_type, KMemoryPermission perm) -> Result {
|
||||||
R_UNLESS(kernel.MemoryLayout().GetPhysicalMemoryRegionTree().FindFirstDerived(
|
R_UNLESS(kernel.MemoryLayout().GetPhysicalMemoryRegionTree().FindFirstDerived(
|
||||||
region_type) != nullptr,
|
region_type) != nullptr,
|
||||||
ResultOutOfRange);
|
ResultOutOfRange);
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}));
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Result KCapabilities::SetInterruptPairCapability(const u32 cap) {
|
Result KCapabilities::SetInterruptPairCapability(const u32 cap) {
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <condition_variable>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
Loading…
Reference in a new issue