mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00
Implement /proc/PID/vm.
Refactored SyntheticFileSystem to maintain an arbitrary directory structure. ProcFileSystem creates a directory entry in /proc for each new process.
This commit is contained in:
parent
10347b9ae8
commit
a32b3a3ddf
15 changed files with 217 additions and 39 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "errno.h"
|
||||
#include "i8253.h"
|
||||
#include "RTC.h"
|
||||
#include "ProcFileSystem.h"
|
||||
|
||||
//#define DEBUG_IO
|
||||
//#define TASK_DEBUG
|
||||
|
@ -397,11 +398,14 @@ Task::Task(String&& name, uid_t uid, gid_t gid, pid_t parentPID, RingLevel ring)
|
|||
// HACK: Ring2 SS in the TSS is the current PID.
|
||||
m_tss.ss2 = m_pid;
|
||||
m_farPtr.offset = 0x98765432;
|
||||
|
||||
ProcFileSystem::the().addProcess(*this);
|
||||
}
|
||||
|
||||
Task::~Task()
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
ProcFileSystem::the().removeProcess(*this);
|
||||
system.nprocess--;
|
||||
delete [] m_ldtEntries;
|
||||
m_ldtEntries = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue