ladybird/Kernel/Devices
Liav A 12b6e69150 Kernel: Introduce the new ProcFS design
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.
2021-06-29 20:53:59 +02:00
..
HID Kernel: Pass TTY-switch keyboard combo to userspace 2021-06-25 19:26:30 +02:00
USB Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
AsyncDeviceRequest.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
AsyncDeviceRequest.h Kernel: Make UserOrKernelBuffer R/W helpers return KResultOr<size_t> 2021-05-13 23:28:40 +02:00
BlockDevice.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BlockDevice.h Kernel: Mark AsyncBlockDeviceRequest + AnonymousVMObject as final 2021-05-03 16:03:17 +02:00
CharacterDevice.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CharacterDevice.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Device.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Device.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
FullDevice.cpp Kernel: Fix adopt_ref_if_nonnull(new T).release_nonnull() pattern 2021-06-29 22:57:52 +04:30
FullDevice.h Kernel: Don't use naked new statements in init process 2021-06-19 09:30:43 +02:00
MemoryDevice.cpp Kernel: Fix adopt_ref_if_nonnull(new T).release_nonnull() pattern 2021-06-29 22:57:52 +04:30
MemoryDevice.h Kernel: Don't use naked new statements in init process 2021-06-19 09:30:43 +02:00
NullDevice.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
NullDevice.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PCISerialDevice.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
PCISerialDevice.h Kernel: Add support for QEMU's emulated pci serial (-pci-serial option) 2021-05-17 19:45:35 +01:00
PCSpeaker.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
PCSpeaker.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RandomDevice.cpp Kernel: Fix adopt_ref_if_nonnull(new T).release_nonnull() pattern 2021-06-29 22:57:52 +04:30
RandomDevice.h Kernel: Don't use naked new statements in init process 2021-06-19 09:30:43 +02:00
SB16.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
SB16.h Kernel/Interrupts: Return boolean on whether we handled the interrupt 2021-06-17 16:53:25 +02:00
SerialDevice.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
SerialDevice.h Kernel: Don't use naked new statements in init process 2021-06-19 09:30:43 +02:00
VMWareBackdoor.cpp Kernel: Move special sections into Sections.h 2021-06-24 00:38:23 +02:00
VMWareBackdoor.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ZeroDevice.cpp Kernel: Fix adopt_ref_if_nonnull(new T).release_nonnull() pattern 2021-06-29 22:57:52 +04:30
ZeroDevice.h Kernel: Don't use naked new statements in init process 2021-06-19 09:30:43 +02:00