mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 01:37:56 -05:00
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.
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
unsigned int Object::next_object_id;
|
||||
std::atomic<u32> Object::next_object_id{0};
|
||||
|
||||
/// Initialize the kernel
|
||||
void Init() {
|
||||
|
Reference in New Issue
Block a user