mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
12b6e69150
The new ProcFS design consists of two main parts: 1. The representative ProcFS class, which is derived from the FS class. The ProcFS and its inodes are much more lean - merely 3 classes to represent the common type of inodes - regular files, symbolic links and directories. They're backed by a ProcFSExposedComponent object, which is responsible for the functional operation behind the scenes. 2. The backend of the ProcFS - the ProcFSComponentsRegistrar class and all derived classes from the ProcFSExposedComponent class. These together form the entire backend and handle all the functions you can expect from the ProcFS. The ProcFSExposedComponent derived classes split to 3 types in the manner of lifetime in the kernel: 1. Persistent objects - this category includes all basic objects, like the root folder, /proc/bus folder, main blob files in the root folders, etc. These objects are persistent and cannot die ever. 2. Semi-persistent objects - this category includes all PID folders, and subdirectories to the PID folders. It also includes exposed objects like the unveil JSON'ed blob. These object are persistent as long as the the responsible process they represent is still alive. 3. Dynamic objects - this category includes files in the subdirectories of a PID folder, like /proc/PID/fd/* or /proc/PID/stacks/*. Essentially, these objects are always created dynamically and when no longer in need after being used, they're deallocated. Nevertheless, the new allocated backend objects and inodes try to use the same InodeIndex if possible - this might change only when a thread dies and a new thread is born with a new thread stack, or when a file descriptor is closed and a new one within the same file descriptor number is opened. This is needed to actually be able to do something useful with these objects. The new design assures that many ProcFS instances can be used at once, with one backend for usage for all instances. |
||
---|---|---|
.. | ||
HID | ||
USB | ||
AsyncDeviceRequest.cpp | ||
AsyncDeviceRequest.h | ||
BlockDevice.cpp | ||
BlockDevice.h | ||
CharacterDevice.cpp | ||
CharacterDevice.h | ||
Device.cpp | ||
Device.h | ||
FullDevice.cpp | ||
FullDevice.h | ||
MemoryDevice.cpp | ||
MemoryDevice.h | ||
NullDevice.cpp | ||
NullDevice.h | ||
PCISerialDevice.cpp | ||
PCISerialDevice.h | ||
PCSpeaker.cpp | ||
PCSpeaker.h | ||
RandomDevice.cpp | ||
RandomDevice.h | ||
SB16.cpp | ||
SB16.h | ||
SerialDevice.cpp | ||
SerialDevice.h | ||
VMWareBackdoor.cpp | ||
VMWareBackdoor.h | ||
ZeroDevice.cpp | ||
ZeroDevice.h |