|
|
@ -8,6 +8,7 @@ |
|
|
#include <bitset> |
|
|
#include <bitset> |
|
|
#include <cstddef> |
|
|
#include <cstddef> |
|
|
#include <memory> |
|
|
#include <memory> |
|
|
|
|
|
#include <random> |
|
|
#include <string> |
|
|
#include <string> |
|
|
#include <vector> |
|
|
#include <vector> |
|
|
#include <boost/container/static_vector.hpp> |
|
|
#include <boost/container/static_vector.hpp> |
|
|
@ -119,6 +120,8 @@ struct CodeSet final { |
|
|
|
|
|
|
|
|
class Process final : public Object { |
|
|
class Process final : public Object { |
|
|
public: |
|
|
public: |
|
|
|
|
|
static constexpr std::size_t RANDOM_ENTROPY_SIZE = 4; |
|
|
|
|
|
|
|
|
static SharedPtr<Process> Create(KernelCore& kernel, std::string&& name); |
|
|
static SharedPtr<Process> Create(KernelCore& kernel, std::string&& name); |
|
|
|
|
|
|
|
|
std::string GetTypeName() const override { |
|
|
std::string GetTypeName() const override { |
|
|
@ -212,6 +215,11 @@ public: |
|
|
total_process_running_time_ticks += ticks; |
|
|
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 |
|
|
* Loads process-specifics configuration info with metadata provided |
|
|
* by an executable. |
|
|
* by an executable. |
|
|
@ -321,6 +329,9 @@ private: |
|
|
/// Per-process handle table for storing created object handles in. |
|
|
/// Per-process handle table for storing created object handles in. |
|
|
HandleTable handle_table; |
|
|
HandleTable handle_table; |
|
|
|
|
|
|
|
|
|
|
|
/// Random values for svcGetInfo RandomEntropy |
|
|
|
|
|
std::array<u64, RANDOM_ENTROPY_SIZE> random_entropy; |
|
|
|
|
|
|
|
|
std::string name; |
|
|
std::string name; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|