Kernel: Add a blunt big process lock.

We can't have multiple threads in the same process running in the kernel
at the same time, so let's have a per-process lock that threads have to
acquire on syscall entry/exit (and yield while blocked.)
This commit is contained in:
Andreas Kling
2019-04-01 20:02:05 +02:00
parent 54ea35703a
commit d5a9f4596b
5 changed files with 37 additions and 0 deletions

View File

@@ -550,6 +550,7 @@ Process::Process(String&& name, uid_t uid, gid_t gid, pid_t ppid, RingLevel ring
, m_executable(move(executable))
, m_tty(tty)
, m_ppid(ppid)
, m_big_lock("Big Process Lock")
{
dbgprintf("Process: New process PID=%u with name=%s\n", m_pid, m_name.characters());