1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +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:
Andreas Kling 2018-10-26 17:42:12 +02:00
parent 10347b9ae8
commit a32b3a3ddf
15 changed files with 217 additions and 39 deletions

View file

@ -2,6 +2,7 @@
#include "StdLib.h"
#include "Types.h"
#include "Traits.h"
namespace AK {
@ -96,6 +97,12 @@ make(Args&&... args)
return OwnPtr<T>(new T(forward<Args>(args)...));
}
template<typename T>
struct Traits<OwnPtr<T>> {
static unsigned hash(const OwnPtr<T>& p) { return (unsigned)p.ptr(); }
static void dump(const OwnPtr<T>& p) { kprintf("%p", p.ptr()); }
};
}
using AK::OwnPtr;