1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:54:58 +00:00
serenity/Kernel/Memory
kleines Filmröllchen a6a439243f Kernel: Turn lock ranks into template parameters
This step would ideally not have been necessary (increases amount of
refactoring and templates necessary, which in turn increases build
times), but it gives us a couple of nice properties:
- SpinlockProtected inside Singleton (a very common combination) can now
  obtain any lock rank just via the template parameter. It was not
  previously possible to do this with SingletonInstanceCreator magic.
- SpinlockProtected's lock rank is now mandatory; this is the majority
  of cases and allows us to see where we're still missing proper ranks.
- The type already informs us what lock rank a lock has, which aids code
  readability and (possibly, if gdb cooperates) lock mismatch debugging.
- The rank of a lock can no longer be dynamic, which is not something we
  wanted in the first place (or made use of). Locks randomly changing
  their rank sounds like a disaster waiting to happen.
- In some places, we might be able to statically check that locks are
  taken in the right order (with the right lock rank checking
  implementation) as rank information is fully statically known.

This refactoring even more exposes the fact that Mutex has no lock rank
capabilites, which is not fixed here.
2023-01-02 18:15:27 -05:00
..
AddressSpace.cpp Kernel: Remove i686 support 2022-12-28 11:53:41 +01:00
AddressSpace.h Kernel: Don't wrap AddressSpace's RegionTree in SpinlockProtected 2022-08-24 14:57:51 +02:00
AllocationStrategy.h Kernel: Rename Kernel/VM/ to Kernel/Memory/ 2021-08-06 14:05:58 +02:00
AnonymousVMObject.cpp AK: Rename Bitmap::try_create() to ::create() 2022-12-22 15:48:53 +01:00
AnonymousVMObject.h Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
InodeVMObject.cpp Kernel: Use RefPtr instead of LockRefPtr for PhysicalPage 2022-08-24 18:35:41 +02:00
InodeVMObject.h Kernel: Use RefPtr instead of LockRefPtr for PhysicalPage 2022-08-24 18:35:41 +02:00
MappedROM.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
MemoryManager.cpp Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
MemoryManager.h Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
PageDirectory.cpp Kernel: Put x86_64 specific VERIFY in PageDirectory.cpp behind ifdef 2022-12-29 19:32:20 -07:00
PageDirectory.h Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
PageFaultResponse.h Kernel: Send SIGBUS to threads that use after valid Inode mmaped range 2022-09-26 20:00:34 +03:00
PhysicalPage.cpp Kernel: Use RefPtr instead of LockRefPtr for PhysicalPage 2022-08-24 18:35:41 +02:00
PhysicalPage.h Kernel: Use RefPtr instead of LockRefPtr for PhysicalPage 2022-08-24 18:35:41 +02:00
PhysicalRegion.cpp Kernel: Use size_t to keep track of the number of pages in a region 2022-12-12 15:14:07 +00:00
PhysicalRegion.h Kernel: Use size_t to keep track of the number of pages in a region 2022-12-12 15:14:07 +00:00
PhysicalZone.cpp Kernel: Add implied auto qualifiers in Memory 2022-01-09 23:29:57 -08:00
PhysicalZone.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
PrivateInodeVMObject.cpp AK: Rename Bitmap::try_create() to ::create() 2022-12-22 15:48:53 +01:00
PrivateInodeVMObject.h Kernel: Handle mmap requests on zero-length data file inodes safely 2022-09-16 14:55:45 +03:00
Region.cpp Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
Region.h Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
RegionTree.cpp Kernel: Remove i686 support 2022-12-28 11:53:41 +01:00
RegionTree.h Kernel: Wrap process address spaces in SpinlockProtected 2022-08-24 14:57:51 +02:00
RingBuffer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
RingBuffer.h Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
ScatterGatherList.cpp Kernel: Use RefPtr instead of LockRefPtr for PhysicalPage 2022-08-24 18:35:41 +02:00
ScatterGatherList.h Kernel: Use RefPtr instead of LockRefPtr for PhysicalPage 2022-08-24 18:35:41 +02:00
ScopedAddressSpaceSwitcher.cpp Kernel: Remove i686 support 2022-12-28 11:53:41 +01:00
ScopedAddressSpaceSwitcher.h Kernel: Rename ProcessPagingScope => ScopedAddressSpaceSwitcher 2021-09-06 18:56:51 +02:00
SharedFramebufferVMObject.cpp Kernel: Use RefPtr instead of LockRefPtr for PhysicalPage 2022-08-24 18:35:41 +02:00
SharedFramebufferVMObject.h Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
SharedInodeVMObject.cpp AK: Rename Bitmap::try_create() to ::create() 2022-12-22 15:48:53 +01:00
SharedInodeVMObject.h Kernel: Handle mmap requests on zero-length data file inodes safely 2022-09-16 14:55:45 +03:00
TypedMapping.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
VirtualRange.cpp Kernel: Use AddressSpace region tree for range allocation 2022-04-03 21:51:58 +02:00
VirtualRange.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
VMObject.cpp Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
VMObject.h Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00