Kernel: replace boost::intrusive_ptr with std::shared_ptr

This commit is contained in:
Weiyi Wang
2019-03-23 16:04:19 -04:00
parent c1de8acfe5
commit 5f11c5f733
96 changed files with 522 additions and 538 deletions

View File

@@ -32,10 +32,14 @@ enum ResourceTypes {
class ResourceLimit final : public Object {
public:
explicit ResourceLimit(KernelSystem& kernel);
~ResourceLimit() override;
/**
* Creates a resource limit object.
*/
static SharedPtr<ResourceLimit> Create(KernelSystem& kernel, std::string name = "Unknown");
static std::shared_ptr<ResourceLimit> Create(KernelSystem& kernel,
std::string name = "Unknown");
std::string GetTypeName() const override {
return "ResourceLimit";
@@ -105,10 +109,6 @@ public:
/// Current CPU time that the processes in this category are utilizing
s32 current_cpu_time = 0;
private:
explicit ResourceLimit(KernelSystem& kernel);
~ResourceLimit() override;
};
class ResourceLimitList {
@@ -121,10 +121,10 @@ public:
* @param category The resource limit category
* @returns The resource limit associated with the category
*/
SharedPtr<ResourceLimit> GetForCategory(ResourceLimitCategory category);
std::shared_ptr<ResourceLimit> GetForCategory(ResourceLimitCategory category);
private:
std::array<SharedPtr<ResourceLimit>, 4> resource_limits;
std::array<std::shared_ptr<ResourceLimit>, 4> resource_limits;
};
} // namespace Kernel