mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:17:35 +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
|
@ -241,6 +241,8 @@ public:
|
|||
|
||||
int thread_count() const;
|
||||
|
||||
Lock& big_lock() { return m_big_lock; }
|
||||
|
||||
private:
|
||||
friend class MemoryManager;
|
||||
friend class Scheduler;
|
||||
|
@ -315,6 +317,8 @@ private:
|
|||
bool m_dead { false };
|
||||
|
||||
int m_next_tid { 0 };
|
||||
|
||||
Lock m_big_lock;
|
||||
};
|
||||
|
||||
class ProcessInspectionHandle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue