mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
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:
parent
54ea35703a
commit
d5a9f4596b
5 changed files with 37 additions and 0 deletions
|
@ -252,10 +252,12 @@ static dword handle(RegisterDump& regs, dword function, dword arg1, dword arg2,
|
|||
|
||||
void syscall_trap_entry(RegisterDump& regs)
|
||||
{
|
||||
current->process().big_lock().lock();
|
||||
dword function = regs.eax;
|
||||
dword arg1 = regs.edx;
|
||||
dword arg2 = regs.ecx;
|
||||
dword arg3 = regs.ebx;
|
||||
regs.eax = Syscall::handle(regs, function, arg1, arg2, arg3);
|
||||
current->process().big_lock().unlock();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue