Kernel: Move Process's process group pointer into protected data

Now that it's no longer using LockRefPtr, we can actually move it into
protected data. (LockRefPtr couldn't be stored there because protected
data is immutable at times, and LockRefPtr uses some of its own bits
for locking.)
This commit is contained in:
Andreas Kling 2023-04-04 08:08:31 +02:00
commit 1e2ef59965
Notes: sideshowbarker 2024-07-17 18:46:30 +09:00
3 changed files with 7 additions and 11 deletions

View file

@ -97,10 +97,6 @@ ErrorOr<FlatPtr> Process::sys$fork(RegisterState& regs)
});
}));
child->m_pg.with([&](auto& child_pg) {
child_pg = m_pg.with([&](auto& pg) { return pg; });
});
with_protected_data([&](auto& my_protected_data) {
child->with_mutable_protected_data([&](auto& child_protected_data) {
child_protected_data.promises = my_protected_data.promises.load();
@ -112,6 +108,7 @@ ErrorOr<FlatPtr> Process::sys$fork(RegisterState& regs)
child_protected_data.umask = my_protected_data.umask;
child_protected_data.signal_trampoline = my_protected_data.signal_trampoline;
child_protected_data.dumpable = my_protected_data.dumpable;
child_protected_data.process_group = my_protected_data.process_group;
});
});