summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.h
diff options
context:
space:
mode:
authorGravatar bunnei2019-03-21 22:18:36 -0400
committerGravatar GitHub2019-03-21 22:18:36 -0400
commit7b6d516faa788c25e26c79e2e5d19915f73983a5 (patch)
treed477c1598d78ad60360f2ab08d3b201fff9f38bd /src/core/hle/kernel/process.h
parentMerge pull request #2274 from lioncash/include (diff)
parentcore/hle/kernel/mutex: Remove usages of global system accessors (diff)
downloadyuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.tar.gz
yuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.tar.xz
yuzu-7b6d516faa788c25e26c79e2e5d19915f73983a5.zip
Merge pull request #2234 from lioncash/mutex
core/hle/kernel: Make Mutex a per-process class.
Diffstat (limited to 'src/core/hle/kernel/process.h')
-rw-r--r--src/core/hle/kernel/process.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index 3ae7c922c..1bd7bf5c1 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -13,6 +13,7 @@
13#include "common/common_types.h" 13#include "common/common_types.h"
14#include "core/hle/kernel/address_arbiter.h" 14#include "core/hle/kernel/address_arbiter.h"
15#include "core/hle/kernel/handle_table.h" 15#include "core/hle/kernel/handle_table.h"
16#include "core/hle/kernel/mutex.h"
16#include "core/hle/kernel/process_capability.h" 17#include "core/hle/kernel/process_capability.h"
17#include "core/hle/kernel/vm_manager.h" 18#include "core/hle/kernel/vm_manager.h"
18#include "core/hle/kernel/wait_object.h" 19#include "core/hle/kernel/wait_object.h"
@@ -126,6 +127,16 @@ public:
126 return address_arbiter; 127 return address_arbiter;
127 } 128 }
128 129
130 /// Gets a reference to the process' mutex lock.
131 Mutex& GetMutex() {
132 return mutex;
133 }
134
135 /// Gets a const reference to the process' mutex lock
136 const Mutex& GetMutex() const {
137 return mutex;
138 }
139
129 /// Gets the current status of the process 140 /// Gets the current status of the process
130 ProcessStatus GetStatus() const { 141 ProcessStatus GetStatus() const {
131 return status; 142 return status;
@@ -288,6 +299,11 @@ private:
288 /// Per-process address arbiter. 299 /// Per-process address arbiter.
289 AddressArbiter address_arbiter; 300 AddressArbiter address_arbiter;
290 301
302 /// The per-process mutex lock instance used for handling various
303 /// forms of services, such as lock arbitration, and condition
304 /// variable related facilities.
305 Mutex mutex;
306
291 /// Random values for svcGetInfo RandomEntropy 307 /// Random values for svcGetInfo RandomEntropy
292 std::array<u64, RANDOM_ENTROPY_SIZE> random_entropy; 308 std::array<u64, RANDOM_ENTROPY_SIZE> random_entropy;
293 309