Kernel: wrap resource limit state into kernel state; pass ref to resource limit
This commit is contained in:
parent
13c26b4371
commit
2a411bb501
7 changed files with 51 additions and 33 deletions
|
@ -22,7 +22,7 @@ KernelSystem::KernelSystem(u32 system_mode) {
|
|||
|
||||
Kernel::MemoryInit(system_mode);
|
||||
|
||||
Kernel::ResourceLimitsInit();
|
||||
resource_limits = std::make_unique<ResourceLimitList>(*this);
|
||||
Kernel::ThreadingInit();
|
||||
Kernel::TimersInit();
|
||||
|
||||
|
@ -40,8 +40,15 @@ KernelSystem::~KernelSystem() {
|
|||
g_current_process = nullptr;
|
||||
|
||||
Kernel::TimersShutdown();
|
||||
Kernel::ResourceLimitsShutdown();
|
||||
Kernel::MemoryShutdown();
|
||||
}
|
||||
|
||||
ResourceLimitList& KernelSystem::ResourceLimit() {
|
||||
return *resource_limits;
|
||||
}
|
||||
|
||||
const ResourceLimitList& KernelSystem::ResourceLimit() const {
|
||||
return *resource_limits;
|
||||
}
|
||||
|
||||
} // namespace Kernel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue