summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-14 20:52:27 +0100
committerGitHub <noreply@github.com>2018-11-14 20:52:27 +0100
commite1ea8cc7214be591067959a3697ed53e95007ac2 (patch)
tree8f4fc978a5799fc729522377fd7a85ccf51b91c2 /src/core/hle/kernel/process.h
parentMerge pull request #1662 from FreddyFunk/CopySurface-Optimization (diff)
parentsvc: Use proper random entropy generation algorithm (diff)
downloadyuzu-e1ea8cc7214be591067959a3697ed53e95007ac2.tar
yuzu-e1ea8cc7214be591067959a3697ed53e95007ac2.tar.gz
yuzu-e1ea8cc7214be591067959a3697ed53e95007ac2.tar.bz2
yuzu-e1ea8cc7214be591067959a3697ed53e95007ac2.tar.lz
yuzu-e1ea8cc7214be591067959a3697ed53e95007ac2.tar.xz
yuzu-e1ea8cc7214be591067959a3697ed53e95007ac2.tar.zst
yuzu-e1ea8cc7214be591067959a3697ed53e95007ac2.zip
Diffstat (limited to 'src/core/hle/kernel/process.h')
-rw-r--r--src/core/hle/kernel/process.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index f79f6d7a5..cf48787ce 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -8,6 +8,7 @@
#include <bitset>
#include <cstddef>
#include <memory>
+#include <random>
#include <string>
#include <vector>
#include <boost/container/static_vector.hpp>
@@ -119,6 +120,8 @@ struct CodeSet final {
class Process final : public Object {
public:
+ static constexpr std::size_t RANDOM_ENTROPY_SIZE = 4;
+
static SharedPtr<Process> Create(KernelCore& kernel, std::string&& name);
std::string GetTypeName() const override {
@@ -212,6 +215,11 @@ public:
total_process_running_time_ticks += ticks;
}
+ /// Gets 8 bytes of random data for svcGetInfo RandomEntropy
+ u64 GetRandomEntropy(std::size_t index) const {
+ return random_entropy.at(index);
+ }
+
/**
* Loads process-specifics configuration info with metadata provided
* by an executable.
@@ -310,6 +318,9 @@ private:
/// Per-process handle table for storing created object handles in.
HandleTable handle_table;
+ /// Random values for svcGetInfo RandomEntropy
+ std::array<u64, RANDOM_ENTROPY_SIZE> random_entropy;
+
std::string name;
};