mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
Kernel: Convert process file descriptor table to a SpinlockProtected
Instead of manually locking in the various member functions of Process::OpenFileDescriptions, simply wrap it in a SpinlockProtected.
This commit is contained in:
parent
93e90e16c3
commit
8ebec2938c
30 changed files with 257 additions and 190 deletions
|
@ -23,7 +23,11 @@ ErrorOr<FlatPtr> Process::sys$fork(RegisterState& regs)
|
|||
child->m_veil_state = m_veil_state;
|
||||
child->m_unveiled_paths = m_unveiled_paths.deep_copy();
|
||||
|
||||
TRY(child->m_fds.try_clone(m_fds));
|
||||
TRY(child->m_fds.with([&](auto& child_fds) {
|
||||
return m_fds.with([&](auto& parent_fds) {
|
||||
return child_fds.try_clone(parent_fds);
|
||||
});
|
||||
}));
|
||||
|
||||
child->m_pg = m_pg;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue