mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 09:55:45 +00: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:
parent
a1aacf27d7
commit
3485963fec
2 changed files with 9 additions and 8 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue