summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-13 00:13:47 -0400
committerGravatar Lioncash2018-08-13 00:16:40 -0400
commit3476f5b4d38d31d6f17a335311a2fa814be8bf25 (patch)
treed0929304994c704ac6dd152a92d528c0e25d715b /src/core/hle/kernel/kernel.cpp
parentMerge pull request #1043 from Subv/timing (diff)
downloadyuzu-3476f5b4d38d31d6f17a335311a2fa814be8bf25.tar.gz
yuzu-3476f5b4d38d31d6f17a335311a2fa814be8bf25.tar.xz
yuzu-3476f5b4d38d31d6f17a335311a2fa814be8bf25.zip
kernel/object: Tighten object against data races
Despite being covered by a global mutex, we should still ensure that the class handles its reference counts properly. This avoids potential shenanigans when it comes to data races. Given this is the root object that drives quite a bit of the kernel object hierarchy, ensuring we always have the correct behavior (and no races) is a good thing.
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 1b0cd0abf..8c19e86d3 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -11,7 +11,7 @@
11 11
12namespace Kernel { 12namespace Kernel {
13 13
14unsigned int Object::next_object_id; 14std::atomic<u32> Object::next_object_id{0};
15 15
16/// Initialize the kernel 16/// Initialize the kernel
17void Init() { 17void Init() {