1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

Kernel: Switch ProcessGroup to IntrusiveList from InlineLinkedList

This commit is contained in:
Brian Gianforcaro 2021-06-03 03:21:04 -07:00 committed by Andreas Kling
parent ce74fce0df
commit 7e691f96e1
3 changed files with 11 additions and 13 deletions

View file

@ -9,12 +9,12 @@
namespace Kernel {
RecursiveSpinLock g_process_groups_lock;
InlineLinkedList<ProcessGroup>* g_process_groups;
ProcessGroup::List* g_process_groups;
ProcessGroup::~ProcessGroup()
{
ScopedSpinLock lock(g_process_groups_lock);
g_process_groups->remove(this);
g_process_groups->remove(*this);
}
RefPtr<ProcessGroup> ProcessGroup::create(ProcessGroupID pgid)
@ -22,7 +22,7 @@ RefPtr<ProcessGroup> ProcessGroup::create(ProcessGroupID pgid)
auto process_group = adopt_ref_if_nonnull(new ProcessGroup(pgid));
if (process_group) {
ScopedSpinLock lock(g_process_groups_lock);
g_process_groups->prepend(process_group);
g_process_groups->prepend(*process_group);
}
return process_group;