mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 13:55:06 +00:00
Kernel: Switch process file descriptor table from spinlock to mutex
There's no reason for this to use a spinlock. Instead, let's allow threads to block if someone else is using the descriptor table.
This commit is contained in:
parent
8ebec2938c
commit
b56646e293
16 changed files with 37 additions and 37 deletions
|
@ -23,8 +23,8 @@ 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.with([&](auto& child_fds) {
|
||||
return m_fds.with([&](auto& parent_fds) {
|
||||
TRY(child->m_fds.with_exclusive([&](auto& child_fds) {
|
||||
return m_fds.with_exclusive([&](auto& parent_fds) {
|
||||
return child_fds.try_clone(parent_fds);
|
||||
});
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue