Kernel: replace boost::intrusive_ptr with std::shared_ptr
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user