diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-12 03:55:22 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-02-19 01:16:24 +0100 |
commit | f7a008d77f8aa47baf4c874c508b38af4965a145 (patch) | |
tree | 3a11b865d5f49be8fa0588ee5187f1b6c12022fb /src/core/hle/kernel/k_system_control.cpp | |
parent | hle: kernel: memory: PageHeap: Migrate to KPageBitmap class. (diff) | |
download | yuzu-f7a008d77f8aa47baf4c874c508b38af4965a145.tar yuzu-f7a008d77f8aa47baf4c874c508b38af4965a145.tar.gz yuzu-f7a008d77f8aa47baf4c874c508b38af4965a145.tar.bz2 yuzu-f7a008d77f8aa47baf4c874c508b38af4965a145.tar.lz yuzu-f7a008d77f8aa47baf4c874c508b38af4965a145.tar.xz yuzu-f7a008d77f8aa47baf4c874c508b38af4965a145.tar.zst yuzu-f7a008d77f8aa47baf4c874c508b38af4965a145.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_system_control.cpp (renamed from src/core/hle/kernel/memory/system_control.cpp) | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/kernel/memory/system_control.cpp b/src/core/hle/kernel/k_system_control.cpp index e855696ad..aa1682f69 100644 --- a/src/core/hle/kernel/memory/system_control.cpp +++ b/src/core/hle/kernel/k_system_control.cpp @@ -1,12 +1,13 @@ -// Copyright 2020 yuzu Emulator Project +// Copyright 2021 yuzu Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. #include <random> -#include "core/hle/kernel/memory/system_control.h" +#include "core/hle/kernel/k_system_control.h" + +namespace Kernel { -namespace Kernel::Memory::SystemControl { namespace { template <typename F> u64 GenerateUniformRange(u64 min, u64 max, F f) { @@ -27,15 +28,15 @@ u64 GenerateUniformRange(u64 min, u64 max, F f) { } // Anonymous namespace -u64 GenerateRandomU64() { +u64 KSystemControl::GenerateRandomU64() { static std::random_device device; static std::mt19937 gen(device()); static std::uniform_int_distribution<u64> distribution(1, std::numeric_limits<u64>::max()); return distribution(gen); } -u64 GenerateRandomRange(u64 min, u64 max) { +u64 KSystemControl::GenerateRandomRange(u64 min, u64 max) { return GenerateUniformRange(min, max, GenerateRandomU64); } -} // namespace Kernel::Memory::SystemControl +} // namespace Kernel |