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
05118a2326
commit
c47e1db46d
2 changed files with 9 additions and 8 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
unsigned int Object::next_object_id;
|
||||
std::atomic<u32> Object::next_object_id{0};
|
||||
|
||||
/// Initialize the kernel
|
||||
void Init(u32 system_mode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue