mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
Way tighter locking in process creation.
We no longer disable interrupts around the whole affair. Since MM manages per-process data structures, this works quite smoothly now. Only procfs had to be tweaked with an InterruptDisabler.
This commit is contained in:
parent
52607aa086
commit
3a901ae36d
3 changed files with 40 additions and 25 deletions
|
@ -116,7 +116,7 @@ ByteBuffer procfs$pid_exe(Process& process)
|
|||
|
||||
void ProcFileSystem::addProcess(Process& process)
|
||||
{
|
||||
ASSERT_INTERRUPTS_DISABLED();
|
||||
InterruptDisabler disabler;
|
||||
char buf[16];
|
||||
ksprintf(buf, "%d", process.pid());
|
||||
auto dir = addFile(createDirectory(buf));
|
||||
|
@ -130,7 +130,7 @@ void ProcFileSystem::addProcess(Process& process)
|
|||
|
||||
void ProcFileSystem::removeProcess(Process& process)
|
||||
{
|
||||
ASSERT_INTERRUPTS_DISABLED();
|
||||
InterruptDisabler disabler;
|
||||
auto pid = process.pid();
|
||||
auto it = m_pid2inode.find(pid);
|
||||
ASSERT(it != m_pid2inode.end());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue