Kernel: pass ref down to Object and wrap ID counter into kernel state

This commit is contained in:
Weiyi Wang 2018-10-13 17:24:51 -04:00
parent 87426b29ff
commit 751ebe55e9
18 changed files with 31 additions and 22 deletions

View file

@ -4,6 +4,7 @@
#pragma once
#include <atomic>
#include <memory>
#include <string>
#include <boost/smart_ptr/intrusive_ptr.hpp>
@ -177,8 +178,11 @@ public:
MemoryPermission other_permissions,
std::string name = "Unknown Applet");
u32 GenerateObjectID();
private:
std::unique_ptr<ResourceLimitList> resource_limits;
std::atomic<u32> next_object_id{0};
};
} // namespace Kernel