summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/process.h')
-rw-r--r--src/core/hle/kernel/process.h50
1 files changed, 32 insertions, 18 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index d781ef32c..070b2b558 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -36,15 +36,18 @@ enum class MemoryRegion : u16 {
union ProcessFlags {
u16 raw;
- BitField< 0, 1, u16> allow_debug; ///< Allows other processes to attach to and debug this process.
- BitField< 1, 1, u16> force_debug; ///< Allows this process to attach to processes even if they don't have allow_debug set.
- BitField< 2, 1, u16> allow_nonalphanum;
- BitField< 3, 1, u16> shared_page_writable; ///< Shared page is mapped with write permissions.
- BitField< 4, 1, u16> privileged_priority; ///< Can use priority levels higher than 24.
- BitField< 5, 1, u16> allow_main_args;
- BitField< 6, 1, u16> shared_device_mem;
- BitField< 7, 1, u16> runnable_on_sleep;
- BitField< 8, 4, MemoryRegion> memory_region; ///< Default region for memory allocations for this process
+ BitField<0, 1, u16>
+ allow_debug; ///< Allows other processes to attach to and debug this process.
+ BitField<1, 1, u16> force_debug; ///< Allows this process to attach to processes even if they
+ /// don't have allow_debug set.
+ BitField<2, 1, u16> allow_nonalphanum;
+ BitField<3, 1, u16> shared_page_writable; ///< Shared page is mapped with write permissions.
+ BitField<4, 1, u16> privileged_priority; ///< Can use priority levels higher than 24.
+ BitField<5, 1, u16> allow_main_args;
+ BitField<6, 1, u16> shared_device_mem;
+ BitField<7, 1, u16> runnable_on_sleep;
+ BitField<8, 4, MemoryRegion>
+ memory_region; ///< Default region for memory allocations for this process
BitField<12, 1, u16> loaded_high; ///< Application loaded high (not at 0x00100000).
};
@@ -54,11 +57,17 @@ struct MemoryRegionInfo;
struct CodeSet final : public Object {
static SharedPtr<CodeSet> Create(std::string name, u64 program_id);
- std::string GetTypeName() const override { return "CodeSet"; }
- std::string GetName() const override { return name; }
+ std::string GetTypeName() const override {
+ return "CodeSet";
+ }
+ std::string GetName() const override {
+ return name;
+ }
static const HandleType HANDLE_TYPE = HandleType::CodeSet;
- HandleType GetHandleType() const override { return HANDLE_TYPE; }
+ HandleType GetHandleType() const override {
+ return HANDLE_TYPE;
+ }
/// Name of the process
std::string name;
@@ -85,11 +94,17 @@ class Process final : public Object {
public:
static SharedPtr<Process> Create(SharedPtr<CodeSet> code_set);
- std::string GetTypeName() const override { return "Process"; }
- std::string GetName() const override { return codeset->name; }
+ std::string GetTypeName() const override {
+ return "Process";
+ }
+ std::string GetName() const override {
+ return codeset->name;
+ }
static const HandleType HANDLE_TYPE = HandleType::Process;
- HandleType GetHandleType() const override { return HANDLE_TYPE; }
+ HandleType GetHandleType() const override {
+ return HANDLE_TYPE;
+ }
static u32 next_process_id;
@@ -124,7 +139,6 @@ public:
*/
void Run(s32 main_thread_priority, u32 stack_size);
-
///////////////////////////////////////////////////////////////////////////////////////////////
// Memory Management
@@ -144,7 +158,8 @@ public:
/// The Thread Local Storage area is allocated as processes create threads,
/// each TLS area is 0x200 bytes, so one page (0x1000) is split up in 8 parts, and each part
- /// holds the TLS for a specific thread. This vector contains which parts are in use for each page as a bitmask.
+ /// holds the TLS for a specific thread. This vector contains which parts are in use for each
+ /// page as a bitmask.
/// This vector will grow as more pages are allocated for new threads.
std::vector<std::bitset<8>> tls_slots;
@@ -164,5 +179,4 @@ private:
};
extern SharedPtr<Process> g_current_process;
-
}