summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-03-31 21:10:44 +0200
committerbunnei <bunneidev@gmail.com>2020-04-17 06:59:28 +0200
commit4caff51710a793c6c2c1069ddd6e92185aa731fe (patch)
tree9770a5cdbfc40f6bddab093d5010f80ddad5bd26 /src/core/hle/kernel/process.cpp
parentcommon: alignment: Add a helper function for generic alignment checking. (diff)
downloadyuzu-4caff51710a793c6c2c1069ddd6e92185aa731fe.tar
yuzu-4caff51710a793c6c2c1069ddd6e92185aa731fe.tar.gz
yuzu-4caff51710a793c6c2c1069ddd6e92185aa731fe.tar.bz2
yuzu-4caff51710a793c6c2c1069ddd6e92185aa731fe.tar.lz
yuzu-4caff51710a793c6c2c1069ddd6e92185aa731fe.tar.xz
yuzu-4caff51710a793c6c2c1069ddd6e92185aa731fe.tar.zst
yuzu-4caff51710a793c6c2c1069ddd6e92185aa731fe.zip
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r--src/core/hle/kernel/process.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index ddbd75b8d..bf727901d 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -59,7 +59,8 @@ void SetupMainThread(Process& owner_process, KernelCore& kernel, u32 priority) {
// (whichever page happens to have an available slot).
class TLSPage {
public:
- static constexpr std::size_t num_slot_entries = Memory::PAGE_SIZE / Memory::TLS_ENTRY_SIZE;
+ static constexpr std::size_t num_slot_entries =
+ Core::Memory::PAGE_SIZE / Core::Memory::TLS_ENTRY_SIZE;
explicit TLSPage(VAddr address) : base_address{address} {}
@@ -78,7 +79,7 @@ public:
}
is_slot_used[i] = true;
- return base_address + (i * Memory::TLS_ENTRY_SIZE);
+ return base_address + (i * Core::Memory::TLS_ENTRY_SIZE);
}
return std::nullopt;
@@ -88,15 +89,15 @@ public:
// Ensure that all given addresses are consistent with how TLS pages
// are intended to be used when releasing slots.
ASSERT(IsWithinPage(address));
- ASSERT((address % Memory::TLS_ENTRY_SIZE) == 0);
+ ASSERT((address % Core::Memory::TLS_ENTRY_SIZE) == 0);
- const std::size_t index = (address - base_address) / Memory::TLS_ENTRY_SIZE;
+ const std::size_t index = (address - base_address) / Core::Memory::TLS_ENTRY_SIZE;
is_slot_used[index] = false;
}
private:
bool IsWithinPage(VAddr address) const {
- return base_address <= address && address < base_address + Memory::PAGE_SIZE;
+ return base_address <= address && address < base_address + Core::Memory::PAGE_SIZE;
}
VAddr base_address;
@@ -306,7 +307,7 @@ VAddr Process::CreateTLSRegion() {
}
void Process::FreeTLSRegion(VAddr tls_address) {
- const VAddr aligned_address = Common::AlignDown(tls_address, Memory::PAGE_SIZE);
+ const VAddr aligned_address = Common::AlignDown(tls_address, Core::Memory::PAGE_SIZE);
auto iter =
std::find_if(tls_pages.begin(), tls_pages.end(), [aligned_address](const auto& page) {
return page.GetBaseAddress() == aligned_address;