kernel/process: Make the handle table per-process
In the kernel, there isn't a singular handle table that everything gets tossed into or used, rather, each process gets its own handle table that it uses. This currently isn't an issue for us, since we only execute one process at the moment, but we may as well get this out of the way so it's not a headache later on.
This commit is contained in:
parent
8dc7db7e33
commit
90a981a03a
9 changed files with 97 additions and 100 deletions
|
@ -118,7 +118,6 @@ struct KernelCore::Impl {
|
|||
process_list.clear();
|
||||
current_process = nullptr;
|
||||
|
||||
handle_table.Clear();
|
||||
resource_limits.fill(nullptr);
|
||||
|
||||
thread_wakeup_callback_handle_table.Clear();
|
||||
|
@ -209,7 +208,6 @@ struct KernelCore::Impl {
|
|||
std::vector<SharedPtr<Process>> process_list;
|
||||
Process* current_process = nullptr;
|
||||
|
||||
Kernel::HandleTable handle_table;
|
||||
std::array<SharedPtr<ResourceLimit>, 4> resource_limits;
|
||||
|
||||
/// The event type of the generic timer callback event
|
||||
|
@ -241,14 +239,6 @@ void KernelCore::Shutdown() {
|
|||
impl->Shutdown();
|
||||
}
|
||||
|
||||
Kernel::HandleTable& KernelCore::HandleTable() {
|
||||
return impl->handle_table;
|
||||
}
|
||||
|
||||
const Kernel::HandleTable& KernelCore::HandleTable() const {
|
||||
return impl->handle_table;
|
||||
}
|
||||
|
||||
SharedPtr<ResourceLimit> KernelCore::ResourceLimitForCategory(
|
||||
ResourceLimitCategory category) const {
|
||||
return impl->resource_limits.at(static_cast<std::size_t>(category));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue