summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2023-02-24 20:10:59 +0200
committerJelle Raaijmakers <jelle@gmta.nl>2023-06-04 21:32:34 +0200
commit7c0540a22900a8366741205dead7f76ae4cfabcc (patch)
treeb5b5a2d3912879070faf86bbff26af715610618e
parentf1cbfc5a6e9b6a60278fcbb3e9fa9b10e1f593e0 (diff)
downloadserenity-7c0540a22900a8366741205dead7f76ae4cfabcc.zip
Everywhere: Move global Kernel pattern code to Kernel/Library directory
This has KString, KBuffer, DoubleBuffer, KBufferBuilder, IOWindow, UserOrKernelBuffer and ScopedCritical classes being moved to the Kernel/Library subdirectory. Also, move the panic and assertions handling code to that directory.
-rw-r--r--AK/Assertions.h2
-rw-r--r--AK/Hex.h2
-rw-r--r--AK/IPv4Address.h2
-rw-r--r--AK/IPv6Address.h2
-rw-r--r--AK/MACAddress.h2
-rw-r--r--AK/Memory.h2
-rw-r--r--AK/Singleton.h2
-rw-r--r--AK/StringUtils.cpp2
-rw-r--r--AK/UUID.h2
-rw-r--r--Kernel/Arch/aarch64/CPUID.h2
-rw-r--r--Kernel/Arch/aarch64/Exceptions.cpp2
-rw-r--r--Kernel/Arch/aarch64/Interrupts.cpp4
-rw-r--r--Kernel/Arch/aarch64/MMU.cpp2
-rw-r--r--Kernel/Arch/aarch64/Panic.cpp4
-rw-r--r--Kernel/Arch/aarch64/SafeMem.cpp2
-rw-r--r--Kernel/Arch/aarch64/ThreadRegisters.h2
-rw-r--r--Kernel/Arch/init.cpp2
-rw-r--r--Kernel/Arch/x86_64/CPU.cpp2
-rw-r--r--Kernel/Arch/x86_64/ISABus/SerialDevice.cpp2
-rw-r--r--Kernel/Arch/x86_64/Interrupts.cpp2
-rw-r--r--Kernel/Arch/x86_64/Interrupts/APIC.cpp2
-rw-r--r--Kernel/Arch/x86_64/PCI/Initializer.cpp2
-rw-r--r--Kernel/Arch/x86_64/Processor.cpp4
-rw-r--r--Kernel/Arch/x86_64/Processor.h2
-rw-r--r--Kernel/Arch/x86_64/ProcessorInfo.h2
-rw-r--r--Kernel/Arch/x86_64/SyscallEntry.cpp4
-rw-r--r--Kernel/Arch/x86_64/Time/APICTimer.cpp2
-rw-r--r--Kernel/Arch/x86_64/Time/HPETComparator.cpp2
-rw-r--r--Kernel/Bus/USB/UHCI/UHCIController.cpp2
-rw-r--r--Kernel/Bus/USB/UHCI/UHCIController.h2
-rw-r--r--Kernel/Bus/USB/UHCI/UHCIDescriptorPool.h2
-rw-r--r--Kernel/Bus/USB/USBConfiguration.cpp2
-rw-r--r--Kernel/Bus/USB/USBDevice.cpp2
-rw-r--r--Kernel/Bus/USB/USBHub.cpp4
-rw-r--r--Kernel/Bus/USB/USBTransfer.cpp2
-rw-r--r--Kernel/Bus/VirtIO/Device.h2
-rw-r--r--Kernel/CMakeLists.txt24
-rw-r--r--Kernel/CommandLine.cpp4
-rw-r--r--Kernel/CommandLine.h2
-rw-r--r--Kernel/Devices/AsyncDeviceRequest.h2
-rw-r--r--Kernel/Devices/Audio/AC97.cpp1
-rw-r--r--Kernel/Devices/Audio/AC97.h2
-rw-r--r--Kernel/Devices/Audio/IntelHDA/Codec.h2
-rw-r--r--Kernel/Devices/Audio/IntelHDA/Controller.h2
-rw-r--r--Kernel/Devices/Audio/IntelHDA/OutputPath.h2
-rw-r--r--Kernel/Devices/Audio/IntelHDA/RingBuffer.h2
-rw-r--r--Kernel/Devices/Audio/IntelHDA/Stream.h2
-rw-r--r--Kernel/Devices/KCOVDevice.cpp2
-rw-r--r--Kernel/Devices/PCISerialDevice.cpp2
-rw-r--r--Kernel/Devices/SerialDevice.cpp2
-rw-r--r--Kernel/Devices/SerialDevice.h2
-rw-r--r--Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp2
-rw-r--r--Kernel/Devices/Storage/ATA/GenericIDE/Channel.h2
-rw-r--r--Kernel/Devices/Storage/NVMe/NVMeQueue.cpp2
-rw-r--r--Kernel/Devices/Storage/SD/SDHostController.cpp1
-rw-r--r--Kernel/Devices/Storage/StorageManagement.cpp2
-rw-r--r--Kernel/FileSystem/Custody.h2
-rw-r--r--Kernel/FileSystem/Ext2FS/DirectoryEntry.h2
-rw-r--r--Kernel/FileSystem/Ext2FS/FileSystem.h2
-rw-r--r--Kernel/FileSystem/FATFS/FileSystem.h2
-rw-r--r--Kernel/FileSystem/FATFS/Inode.cpp2
-rw-r--r--Kernel/FileSystem/FATFS/Inode.h4
-rw-r--r--Kernel/FileSystem/FIFO.h2
-rw-r--r--Kernel/FileSystem/File.h2
-rw-r--r--Kernel/FileSystem/FileSystem.h2
-rw-r--r--Kernel/FileSystem/ISO9660FS/DirectoryEntry.h2
-rw-r--r--Kernel/FileSystem/ISO9660FS/DirectoryIterator.cpp2
-rw-r--r--Kernel/FileSystem/ISO9660FS/DirectoryIterator.h2
-rw-r--r--Kernel/FileSystem/ISO9660FS/FileSystem.h2
-rw-r--r--Kernel/FileSystem/Inode.cpp2
-rw-r--r--Kernel/FileSystem/OpenFileDescription.h2
-rw-r--r--Kernel/FileSystem/Plan9FS/FileSystem.h2
-rw-r--r--Kernel/FileSystem/Plan9FS/Inode.h2
-rw-r--r--Kernel/FileSystem/Plan9FS/Message.h4
-rw-r--r--Kernel/FileSystem/ProcFS/Inode.h2
-rw-r--r--Kernel/FileSystem/ProcFS/ProcessExposed.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Component.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/DeviceComponent.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/SymbolicLinkDeviceComponent.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceAttribute.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceDirectory.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceAttribute.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceDirectory.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/Directory.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/DiskUsage.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Interrupts.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Jails.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Keymap.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Log.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/MemoryStatus.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/ARP.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Adapters.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Local.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Route.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Profile.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Uptime.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CapsLockRemap.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CoredumpDirectory.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.h2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.h6
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/UBSANDeadly.h2
-rw-r--r--Kernel/FileSystem/UnveilNode.h2
-rw-r--r--Kernel/FileSystem/VirtualFileSystem.cpp2
-rw-r--r--Kernel/Firmware/ACPI/Parser.cpp2
-rw-r--r--Kernel/Firmware/MultiProcessor/Parser.cpp2
-rw-r--r--Kernel/Graphics/VMWare/GraphicsAdapter.cpp2
-rw-r--r--Kernel/Graphics/VMWare/GraphicsAdapter.h2
-rw-r--r--Kernel/Heap/kmalloc.cpp4
-rw-r--r--Kernel/Interrupts/GenericInterruptHandler.cpp2
-rw-r--r--Kernel/Interrupts/SharedIRQHandler.cpp2
-rw-r--r--Kernel/Interrupts/UnhandledInterruptHandler.cpp2
-rw-r--r--Kernel/Library/Assertions.h (renamed from Kernel/Assertions.h)0
-rw-r--r--Kernel/Library/DoubleBuffer.cpp (renamed from Kernel/DoubleBuffer.cpp)2
-rw-r--r--Kernel/Library/DoubleBuffer.h (renamed from Kernel/DoubleBuffer.h)4
-rw-r--r--Kernel/Library/IOWindow.cpp (renamed from Kernel/IOWindow.cpp)2
-rw-r--r--Kernel/Library/IOWindow.h (renamed from Kernel/IOWindow.h)0
-rw-r--r--Kernel/Library/KBuffer.h (renamed from Kernel/KBuffer.h)2
-rw-r--r--Kernel/Library/KBufferBuilder.cpp (renamed from Kernel/KBufferBuilder.cpp)2
-rw-r--r--Kernel/Library/KBufferBuilder.h (renamed from Kernel/KBufferBuilder.h)2
-rw-r--r--Kernel/Library/KLexicalPath.cpp (renamed from Kernel/KLexicalPath.cpp)2
-rw-r--r--Kernel/Library/KLexicalPath.h (renamed from Kernel/KLexicalPath.h)2
-rw-r--r--Kernel/Library/KString.cpp (renamed from Kernel/KString.cpp)2
-rw-r--r--Kernel/Library/KString.h (renamed from Kernel/KString.h)0
-rw-r--r--Kernel/Library/LockRefPtr.h2
-rw-r--r--Kernel/Library/LockWeakable.h2
-rw-r--r--Kernel/Library/MiniStdLib.cpp (renamed from Kernel/MiniStdLib.cpp)2
-rw-r--r--Kernel/Library/NonnullLockRefPtr.h2
-rw-r--r--Kernel/Library/Panic.cpp (renamed from Kernel/Panic.cpp)2
-rw-r--r--Kernel/Library/Panic.h (renamed from Kernel/Panic.h)0
-rw-r--r--Kernel/Library/ScopedCritical.cpp (renamed from Kernel/ScopedCritical.cpp)2
-rw-r--r--Kernel/Library/ScopedCritical.h (renamed from Kernel/ScopedCritical.h)0
-rw-r--r--Kernel/Library/StdLib.cpp (renamed from Kernel/StdLib.cpp)2
-rw-r--r--Kernel/Library/StdLib.h (renamed from Kernel/StdLib.h)2
-rw-r--r--Kernel/Library/UserOrKernelBuffer.cpp (renamed from Kernel/UserOrKernelBuffer.cpp)2
-rw-r--r--Kernel/Library/UserOrKernelBuffer.h (renamed from Kernel/UserOrKernelBuffer.h)2
-rw-r--r--Kernel/Memory/MemoryManager.cpp4
-rw-r--r--Kernel/Memory/PhysicalRegion.cpp2
-rw-r--r--Kernel/Memory/Region.cpp2
-rw-r--r--Kernel/Memory/Region.h2
-rw-r--r--Kernel/Memory/RingBuffer.cpp2
-rw-r--r--Kernel/Memory/RingBuffer.h2
-rw-r--r--Kernel/Net/IPv4Socket.h4
-rw-r--r--Kernel/Net/IPv4SocketTuple.h6
-rw-r--r--Kernel/Net/Intel/E1000ENetworkAdapter.h2
-rw-r--r--Kernel/Net/Intel/E1000NetworkAdapter.h2
-rw-r--r--Kernel/Net/LocalSocket.cpp2
-rw-r--r--Kernel/Net/LocalSocket.h2
-rw-r--r--Kernel/Net/NetworkAdapter.cpp2
-rw-r--r--Kernel/Net/NetworkAdapter.h4
-rw-r--r--Kernel/Net/NetworkingManagement.cpp2
-rw-r--r--Kernel/Net/Realtek/RTL8168NetworkAdapter.h2
-rw-r--r--Kernel/PerformanceEventBuffer.cpp2
-rw-r--r--Kernel/PerformanceEventBuffer.h2
-rw-r--r--Kernel/Prekernel/CMakeLists.txt2
-rw-r--r--Kernel/Security/Jail.h2
-rw-r--r--Kernel/Security/Random.h2
-rw-r--r--Kernel/Syscall.cpp2
-rw-r--r--Kernel/Syscalls/debug.cpp2
-rw-r--r--Kernel/Syscalls/execve.cpp2
-rw-r--r--Kernel/Syscalls/getrandom.cpp2
-rw-r--r--Kernel/Syscalls/jail.cpp2
-rw-r--r--Kernel/Syscalls/open.cpp2
-rw-r--r--Kernel/Syscalls/unveil.cpp2
-rw-r--r--Kernel/Syscalls/utimensat.cpp2
-rw-r--r--Kernel/TTY/ConsoleManagement.cpp2
-rw-r--r--Kernel/TTY/MasterPTY.h2
-rw-r--r--Kernel/TTY/TTY.h2
-rw-r--r--Kernel/TTY/VirtualConsole.cpp2
-rw-r--r--Kernel/Tasks/Coredump.cpp4
-rw-r--r--Kernel/Tasks/CrashHandler.cpp2
-rw-r--r--Kernel/Tasks/Process.cpp6
-rw-r--r--Kernel/Tasks/Process.h4
-rw-r--r--Kernel/Tasks/Scheduler.cpp2
-rw-r--r--Kernel/Tasks/Thread.cpp2
-rw-r--r--Kernel/Tasks/Thread.h2
-rw-r--r--Userland/Libraries/LibEDID/EDID.cpp2
-rw-r--r--Userland/Libraries/LibEDID/EDID.h2
-rw-r--r--Userland/Libraries/LibELF/Image.cpp2
193 files changed, 238 insertions, 240 deletions
diff --git a/AK/Assertions.h b/AK/Assertions.h
index 0c01eddc58..126780620b 100644
--- a/AK/Assertions.h
+++ b/AK/Assertions.h
@@ -7,7 +7,7 @@
#pragma once
#if defined(KERNEL)
-# include <Kernel/Assertions.h>
+# include <Kernel/Library/Assertions.h>
#else
# include <assert.h>
extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*);
diff --git a/AK/Hex.h b/AK/Hex.h
index 203ca4d5c8..b65f46757b 100644
--- a/AK/Hex.h
+++ b/AK/Hex.h
@@ -11,7 +11,7 @@
#include <AK/StringView.h>
#ifdef KERNEL
-# include <Kernel/KString.h>
+# include <Kernel/Library/KString.h>
#else
# include <AK/DeprecatedString.h>
#endif
diff --git a/AK/IPv4Address.h b/AK/IPv4Address.h
index 32b76e217d..3d0330604c 100644
--- a/AK/IPv4Address.h
+++ b/AK/IPv4Address.h
@@ -14,7 +14,7 @@
#ifdef KERNEL
# include <AK/Error.h>
-# include <Kernel/KString.h>
+# include <Kernel/Library/KString.h>
#else
# include <AK/DeprecatedString.h>
# include <AK/String.h>
diff --git a/AK/IPv6Address.h b/AK/IPv6Address.h
index 292b0a5f62..e2e59dd6f9 100644
--- a/AK/IPv6Address.h
+++ b/AK/IPv6Address.h
@@ -14,7 +14,7 @@
#ifdef KERNEL
# include <AK/Error.h>
-# include <Kernel/KString.h>
+# include <Kernel/Library/KString.h>
#else
# include <AK/DeprecatedString.h>
#endif
diff --git a/AK/MACAddress.h b/AK/MACAddress.h
index d347bc9726..3e410f4085 100644
--- a/AK/MACAddress.h
+++ b/AK/MACAddress.h
@@ -13,7 +13,7 @@
#include <AK/Vector.h>
#ifdef KERNEL
-# include <Kernel/KString.h>
+# include <Kernel/Library/KString.h>
#else
# include <AK/DeprecatedString.h>
#endif
diff --git a/AK/Memory.h b/AK/Memory.h
index e3af860807..6b5bd69608 100644
--- a/AK/Memory.h
+++ b/AK/Memory.h
@@ -10,7 +10,7 @@
#include <AK/Types.h>
#if defined(KERNEL)
-# include <Kernel/StdLib.h>
+# include <Kernel/Library/StdLib.h>
#else
# include <string.h>
#endif
diff --git a/AK/Singleton.h b/AK/Singleton.h
index 626ba07b91..f3c57e5f20 100644
--- a/AK/Singleton.h
+++ b/AK/Singleton.h
@@ -11,8 +11,8 @@
#include <AK/Noncopyable.h>
#ifdef KERNEL
# include <Kernel/Arch/Processor.h>
+# include <Kernel/Library/ScopedCritical.h>
# include <Kernel/Locking/SpinlockProtected.h>
-# include <Kernel/ScopedCritical.h>
#elif defined(AK_OS_WINDOWS)
// Forward declare to avoid pulling Windows.h into every file in existence.
extern "C" __declspec(dllimport) void __stdcall Sleep(unsigned long);
diff --git a/AK/StringUtils.cpp b/AK/StringUtils.cpp
index 35730bfd34..fd242adf00 100644
--- a/AK/StringUtils.cpp
+++ b/AK/StringUtils.cpp
@@ -15,7 +15,7 @@
#include <AK/Vector.h>
#ifdef KERNEL
-# include <Kernel/StdLib.h>
+# include <Kernel/Library/StdLib.h>
#else
# include <AK/DeprecatedString.h>
# include <AK/FloatingPointStringConversions.h>
diff --git a/AK/UUID.h b/AK/UUID.h
index 0c88582a46..8a739318e0 100644
--- a/AK/UUID.h
+++ b/AK/UUID.h
@@ -12,7 +12,7 @@
#include <AK/Types.h>
#ifdef KERNEL
-# include <Kernel/KString.h>
+# include <Kernel/Library/KString.h>
#else
# include <AK/String.h>
#endif
diff --git a/Kernel/Arch/aarch64/CPUID.h b/Kernel/Arch/aarch64/CPUID.h
index bb134ef45c..edbb53047a 100644
--- a/Kernel/Arch/aarch64/CPUID.h
+++ b/Kernel/Arch/aarch64/CPUID.h
@@ -11,7 +11,7 @@
#include <AK/Types.h>
#include <AK/UFixedBigInt.h>
#include <Kernel/Arch/aarch64/Registers.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
#include <AK/Platform.h>
VALIDATE_IS_AARCH64()
diff --git a/Kernel/Arch/aarch64/Exceptions.cpp b/Kernel/Arch/aarch64/Exceptions.cpp
index 8b6005fbed..093419827a 100644
--- a/Kernel/Arch/aarch64/Exceptions.cpp
+++ b/Kernel/Arch/aarch64/Exceptions.cpp
@@ -8,7 +8,7 @@
#include <Kernel/Arch/aarch64/CPU.h>
#include <Kernel/Arch/aarch64/Processor.h>
#include <Kernel/Arch/aarch64/Registers.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
extern "C" uintptr_t vector_table_el1;
diff --git a/Kernel/Arch/aarch64/Interrupts.cpp b/Kernel/Arch/aarch64/Interrupts.cpp
index adfebdc108..e8a3d8f6b9 100644
--- a/Kernel/Arch/aarch64/Interrupts.cpp
+++ b/Kernel/Arch/aarch64/Interrupts.cpp
@@ -13,8 +13,8 @@
#include <Kernel/Interrupts/SharedIRQHandler.h>
#include <Kernel/Interrupts/UnhandledInterruptHandler.h>
#include <Kernel/KSyms.h>
-#include <Kernel/Panic.h>
-#include <Kernel/StdLib.h>
+#include <Kernel/Library/Panic.h>
+#include <Kernel/Library/StdLib.h>
namespace Kernel {
diff --git a/Kernel/Arch/aarch64/MMU.cpp b/Kernel/Arch/aarch64/MMU.cpp
index f5c7cebb6a..10eb030e16 100644
--- a/Kernel/Arch/aarch64/MMU.cpp
+++ b/Kernel/Arch/aarch64/MMU.cpp
@@ -14,7 +14,7 @@
#include <Kernel/Arch/aarch64/RPi/UART.h>
#include <Kernel/Arch/aarch64/Registers.h>
#include <Kernel/BootInfo.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Sections.h>
// Documentation here for Aarch64 Address Translations
diff --git a/Kernel/Arch/aarch64/Panic.cpp b/Kernel/Arch/aarch64/Panic.cpp
index 85a9767404..5b0ddc99c4 100644
--- a/Kernel/Arch/aarch64/Panic.cpp
+++ b/Kernel/Arch/aarch64/Panic.cpp
@@ -6,9 +6,9 @@
#include <Kernel/Arch/Processor.h>
#include <Kernel/KSyms.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
-// FIXME: Merge the code in this file with Kernel/Panic.cpp once the proper abstractions are in place.
+// FIXME: Merge the code in this file with Kernel/Library/Panic.cpp once the proper abstractions are in place.
// Note: This is required here, since __assertion_failed should be out of the Kernel namespace,
// but the PANIC macro uses functions that require the Kernel namespace.
diff --git a/Kernel/Arch/aarch64/SafeMem.cpp b/Kernel/Arch/aarch64/SafeMem.cpp
index 1d8054633a..721a1ee00d 100644
--- a/Kernel/Arch/aarch64/SafeMem.cpp
+++ b/Kernel/Arch/aarch64/SafeMem.cpp
@@ -7,7 +7,7 @@
#include <Kernel/Arch/RegisterState.h>
#include <Kernel/Arch/SafeMem.h>
-#include <Kernel/StdLib.h>
+#include <Kernel/Library/StdLib.h>
#define CODE_SECTION(section_name) __attribute__((section(section_name)))
diff --git a/Kernel/Arch/aarch64/ThreadRegisters.h b/Kernel/Arch/aarch64/ThreadRegisters.h
index 94130cfeff..30843c5324 100644
--- a/Kernel/Arch/aarch64/ThreadRegisters.h
+++ b/Kernel/Arch/aarch64/ThreadRegisters.h
@@ -7,8 +7,8 @@
#pragma once
#include <AK/Types.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Memory/AddressSpace.h>
-#include <Kernel/StdLib.h>
namespace Kernel {
diff --git a/Kernel/Arch/init.cpp b/Kernel/Arch/init.cpp
index 0cfa86b6db..09e42b1ba5 100644
--- a/Kernel/Arch/init.cpp
+++ b/Kernel/Arch/init.cpp
@@ -37,11 +37,11 @@
#include <Kernel/Graphics/GraphicsManagement.h>
#include <Kernel/Heap/kmalloc.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Multiboot.h>
#include <Kernel/Net/NetworkTask.h>
#include <Kernel/Net/NetworkingManagement.h>
-#include <Kernel/Panic.h>
#include <Kernel/Prekernel/Prekernel.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
diff --git a/Kernel/Arch/x86_64/CPU.cpp b/Kernel/Arch/x86_64/CPU.cpp
index 5c735d6c4e..d64a004349 100644
--- a/Kernel/Arch/x86_64/CPU.cpp
+++ b/Kernel/Arch/x86_64/CPU.cpp
@@ -6,7 +6,7 @@
#include <AK/Assertions.h>
#include <Kernel/Arch/CPU.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Tasks/Process.h>
using namespace Kernel;
diff --git a/Kernel/Arch/x86_64/ISABus/SerialDevice.cpp b/Kernel/Arch/x86_64/ISABus/SerialDevice.cpp
index 22a50d9a3d..b46cf931d6 100644
--- a/Kernel/Arch/x86_64/ISABus/SerialDevice.cpp
+++ b/Kernel/Arch/x86_64/ISABus/SerialDevice.cpp
@@ -6,7 +6,7 @@
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Devices/SerialDevice.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Sections.h>
namespace Kernel {
diff --git a/Kernel/Arch/x86_64/Interrupts.cpp b/Kernel/Arch/x86_64/Interrupts.cpp
index 7dba1a1195..a210c22740 100644
--- a/Kernel/Arch/x86_64/Interrupts.cpp
+++ b/Kernel/Arch/x86_64/Interrupts.cpp
@@ -15,7 +15,7 @@
#include <Kernel/Interrupts/SharedIRQHandler.h>
#include <Kernel/Interrupts/SpuriousInterruptHandler.h>
#include <Kernel/Interrupts/UnhandledInterruptHandler.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
diff --git a/Kernel/Arch/x86_64/Interrupts/APIC.cpp b/Kernel/Arch/x86_64/Interrupts/APIC.cpp
index c717495cb5..e29a30e36b 100644
--- a/Kernel/Arch/x86_64/Interrupts/APIC.cpp
+++ b/Kernel/Arch/x86_64/Interrupts/APIC.cpp
@@ -16,10 +16,10 @@
#include <Kernel/Debug.h>
#include <Kernel/Firmware/ACPI/Parser.h>
#include <Kernel/Interrupts/SpuriousInterruptHandler.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/TypedMapping.h>
-#include <Kernel/Panic.h>
#include <Kernel/Sections.h>
#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Tasks/Thread.h>
diff --git a/Kernel/Arch/x86_64/PCI/Initializer.cpp b/Kernel/Arch/x86_64/PCI/Initializer.cpp
index f90479caea..264946639a 100644
--- a/Kernel/Arch/x86_64/PCI/Initializer.cpp
+++ b/Kernel/Arch/x86_64/PCI/Initializer.cpp
@@ -12,7 +12,7 @@
#include <Kernel/CommandLine.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/BusDirectory.h>
#include <Kernel/Firmware/ACPI/Parser.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Sections.h>
namespace Kernel::PCI {
diff --git a/Kernel/Arch/x86_64/Processor.cpp b/Kernel/Arch/x86_64/Processor.cpp
index 01feeccfe4..34656f0273 100644
--- a/Kernel/Arch/x86_64/Processor.cpp
+++ b/Kernel/Arch/x86_64/Processor.cpp
@@ -14,9 +14,9 @@
#include <Kernel/Arch/x86_64/Interrupts/APIC.h>
#include <Kernel/InterruptDisabler.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Sections.h>
#include <Kernel/Security/Random.h>
-#include <Kernel/StdLib.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Tasks/Thread.h>
@@ -28,7 +28,7 @@
#include <Kernel/Arch/x86_64/CPUID.h>
#include <Kernel/Arch/x86_64/MSR.h>
#include <Kernel/Arch/x86_64/ProcessorInfo.h>
-#include <Kernel/ScopedCritical.h>
+#include <Kernel/Library/ScopedCritical.h>
#include <Kernel/Arch/PageDirectory.h>
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>
diff --git a/Kernel/Arch/x86_64/Processor.h b/Kernel/Arch/x86_64/Processor.h
index 9f9c9886a3..1bbe004243 100644
--- a/Kernel/Arch/x86_64/Processor.h
+++ b/Kernel/Arch/x86_64/Processor.h
@@ -20,7 +20,7 @@
#include <Kernel/Arch/x86_64/SIMDState.h>
#include <Kernel/Arch/x86_64/TSS.h>
#include <Kernel/Forward.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
#include <AK/Platform.h>
VALIDATE_IS_X86()
diff --git a/Kernel/Arch/x86_64/ProcessorInfo.h b/Kernel/Arch/x86_64/ProcessorInfo.h
index 6bb90b0ea7..dfb4629c25 100644
--- a/Kernel/Arch/x86_64/ProcessorInfo.h
+++ b/Kernel/Arch/x86_64/ProcessorInfo.h
@@ -8,7 +8,7 @@
#pragma once
#include <AK/Types.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
#include <AK/Platform.h>
VALIDATE_IS_X86()
diff --git a/Kernel/Arch/x86_64/SyscallEntry.cpp b/Kernel/Arch/x86_64/SyscallEntry.cpp
index 45e7c339fd..daf881b322 100644
--- a/Kernel/Arch/x86_64/SyscallEntry.cpp
+++ b/Kernel/Arch/x86_64/SyscallEntry.cpp
@@ -8,8 +8,8 @@
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Arch/x86_64/DescriptorTable.h>
#include <Kernel/Arch/x86_64/Processor.h>
-#include <Kernel/Assertions.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Assertions.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Tasks/Thread.h>
diff --git a/Kernel/Arch/x86_64/Time/APICTimer.cpp b/Kernel/Arch/x86_64/Time/APICTimer.cpp
index 5c6499dcb1..4ce20a9142 100644
--- a/Kernel/Arch/x86_64/Time/APICTimer.cpp
+++ b/Kernel/Arch/x86_64/Time/APICTimer.cpp
@@ -6,7 +6,7 @@
#include <Kernel/Arch/x86_64/Interrupts/APIC.h>
#include <Kernel/Arch/x86_64/Time/APICTimer.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Sections.h>
#include <Kernel/Time/TimeManagement.h>
diff --git a/Kernel/Arch/x86_64/Time/HPETComparator.cpp b/Kernel/Arch/x86_64/Time/HPETComparator.cpp
index 952eec7e2f..45e0c67590 100644
--- a/Kernel/Arch/x86_64/Time/HPETComparator.cpp
+++ b/Kernel/Arch/x86_64/Time/HPETComparator.cpp
@@ -5,9 +5,9 @@
*/
#include <Kernel/Arch/x86_64/Time/HPETComparator.h>
-#include <Kernel/Assertions.h>
#include <Kernel/Debug.h>
#include <Kernel/InterruptDisabler.h>
+#include <Kernel/Library/Assertions.h>
#include <Kernel/Sections.h>
#include <Kernel/Time/TimeManagement.h>
diff --git a/Kernel/Bus/USB/UHCI/UHCIController.cpp b/Kernel/Bus/USB/UHCI/UHCIController.cpp
index a5ec69a9b7..26e6e8c0aa 100644
--- a/Kernel/Bus/USB/UHCI/UHCIController.cpp
+++ b/Kernel/Bus/USB/UHCI/UHCIController.cpp
@@ -12,10 +12,10 @@
#include <Kernel/Bus/USB/UHCI/UHCIController.h>
#include <Kernel/Bus/USB/USBRequest.h>
#include <Kernel/Debug.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Sections.h>
-#include <Kernel/StdLib.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
diff --git a/Kernel/Bus/USB/UHCI/UHCIController.h b/Kernel/Bus/USB/UHCI/UHCIController.h
index dce859bbb8..543de8e2e3 100644
--- a/Kernel/Bus/USB/UHCI/UHCIController.h
+++ b/Kernel/Bus/USB/UHCI/UHCIController.h
@@ -15,8 +15,8 @@
#include <Kernel/Bus/USB/UHCI/UHCIDescriptorTypes.h>
#include <Kernel/Bus/USB/UHCI/UHCIRootHub.h>
#include <Kernel/Bus/USB/USBController.h>
-#include <Kernel/IOWindow.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Locking/Spinlock.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/Bus/USB/UHCI/UHCIDescriptorPool.h b/Kernel/Bus/USB/UHCI/UHCIDescriptorPool.h
index e1dbb41e57..4c980d9b05 100644
--- a/Kernel/Bus/USB/UHCI/UHCIDescriptorPool.h
+++ b/Kernel/Bus/USB/UHCI/UHCIDescriptorPool.h
@@ -9,10 +9,10 @@
#include <AK/NonnullOwnPtr.h>
#include <AK/OwnPtr.h>
#include <AK/Stack.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Locking/Spinlock.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/Region.h>
-#include <Kernel/StdLib.h>
namespace Kernel::USB {
diff --git a/Kernel/Bus/USB/USBConfiguration.cpp b/Kernel/Bus/USB/USBConfiguration.cpp
index ecf86aaf48..a1c7099b04 100644
--- a/Kernel/Bus/USB/USBConfiguration.cpp
+++ b/Kernel/Bus/USB/USBConfiguration.cpp
@@ -9,7 +9,7 @@
#include <Kernel/Bus/USB/USBConfiguration.h>
#include <Kernel/Bus/USB/USBInterface.h>
#include <Kernel/Bus/USB/USBRequest.h>
-#include <Kernel/StdLib.h>
+#include <Kernel/Library/StdLib.h>
namespace Kernel::USB {
diff --git a/Kernel/Bus/USB/USBDevice.cpp b/Kernel/Bus/USB/USBDevice.cpp
index 95a0f10d6e..1f1d1b24ae 100644
--- a/Kernel/Bus/USB/USBDevice.cpp
+++ b/Kernel/Bus/USB/USBDevice.cpp
@@ -12,7 +12,7 @@
#include <Kernel/Bus/USB/USBDevice.h>
#include <Kernel/Bus/USB/USBRequest.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h>
-#include <Kernel/StdLib.h>
+#include <Kernel/Library/StdLib.h>
namespace Kernel::USB {
diff --git a/Kernel/Bus/USB/USBHub.cpp b/Kernel/Bus/USB/USBHub.cpp
index e6a3f7bc8d..290d7e2734 100644
--- a/Kernel/Bus/USB/USBHub.cpp
+++ b/Kernel/Bus/USB/USBHub.cpp
@@ -10,8 +10,8 @@
#include <Kernel/Bus/USB/USBHub.h>
#include <Kernel/Bus/USB/USBRequest.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.h>
-#include <Kernel/IOWindow.h>
-#include <Kernel/StdLib.h>
+#include <Kernel/Library/IOWindow.h>
+#include <Kernel/Library/StdLib.h>
namespace Kernel::USB {
diff --git a/Kernel/Bus/USB/USBTransfer.cpp b/Kernel/Bus/USB/USBTransfer.cpp
index 528df1ae30..88959720a3 100644
--- a/Kernel/Bus/USB/USBTransfer.cpp
+++ b/Kernel/Bus/USB/USBTransfer.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/Bus/USB/USBTransfer.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/StdLib.h>
namespace Kernel::USB {
diff --git a/Kernel/Bus/VirtIO/Device.h b/Kernel/Bus/VirtIO/Device.h
index 582576b78d..7e0c64964e 100644
--- a/Kernel/Bus/VirtIO/Device.h
+++ b/Kernel/Bus/VirtIO/Device.h
@@ -10,8 +10,8 @@
#include <Kernel/Bus/PCI/Device.h>
#include <Kernel/Bus/VirtIO/Definitions.h>
#include <Kernel/Bus/VirtIO/Queue.h>
-#include <Kernel/IOWindow.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Memory/MemoryManager.h>
namespace Kernel::VirtIO {
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index 57569be4d1..4c57831f21 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -114,9 +114,7 @@ set(KERNEL_SOURCES
Graphics/VirtIOGPU/Console.cpp
Graphics/VirtIOGPU/GPU3DDevice.cpp
Graphics/VirtIOGPU/GraphicsAdapter.cpp
- IOWindow.cpp
SanCov.cpp
- DoubleBuffer.cpp
FileSystem/AnonymousFile.cpp
FileSystem/BlockBasedFileSystem.cpp
FileSystem/Custody.cpp
@@ -217,9 +215,6 @@ set(KERNEL_SOURCES
Interrupts/PCIIRQHandler.cpp
Interrupts/SharedIRQHandler.cpp
Interrupts/UnhandledInterruptHandler.cpp
- KBufferBuilder.cpp
- KLexicalPath.cpp
- KString.cpp
KSyms.cpp
Memory/AddressSpace.cpp
Memory/AnonymousVMObject.cpp
@@ -238,9 +233,18 @@ set(KERNEL_SOURCES
Memory/SharedInodeVMObject.cpp
Memory/VMObject.cpp
Memory/VirtualRange.cpp
- MiniStdLib.cpp
Locking/LockRank.cpp
Locking/Mutex.cpp
+ Library/DoubleBuffer.cpp
+ Library/IOWindow.cpp
+ Library/MiniStdLib.cpp
+ Library/Panic.cpp
+ Library/ScopedCritical.cpp
+ Library/StdLib.cpp
+ Library/KBufferBuilder.cpp
+ Library/KLexicalPath.cpp
+ Library/KString.cpp
+ Library/UserOrKernelBuffer.cpp
Net/Intel/E1000ENetworkAdapter.cpp
Net/Intel/E1000NetworkAdapter.cpp
Net/Realtek/RTL8168NetworkAdapter.cpp
@@ -254,10 +258,7 @@ set(KERNEL_SOURCES
Net/Socket.cpp
Net/TCPSocket.cpp
Net/UDPSocket.cpp
- Panic.cpp
PerformanceEventBuffer.cpp
- ScopedCritical.cpp
- StdLib.cpp
Syscall.cpp
Security/AddressSanitizer.cpp
Security/Credentials.cpp
@@ -358,7 +359,6 @@ set(KERNEL_SOURCES
Tasks/WorkQueue.cpp
Time/TimeManagement.cpp
TimerQueue.cpp
- UserOrKernelBuffer.cpp
)
if ("${SERENITY_ARCH}" STREQUAL "x86_64")
@@ -405,7 +405,7 @@ if ("${SERENITY_ARCH}" STREQUAL "x86_64")
# TODO: Share these with the aarch64 build
Interrupts/SpuriousInterruptHandler.cpp
- kprintf.cpp
+ kprintf.cpp
)
set(KERNEL_SOURCES
@@ -599,7 +599,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Prevent naively implemented string functions (like strlen) from being "optimized" into a call to themselves.
- set_source_files_properties(MiniStdLib.cpp
+ set_source_files_properties(Library/MiniStdLib.cpp
PROPERTIES COMPILE_FLAGS "-fno-tree-loop-distribution -fno-tree-loop-distribute-patterns")
add_link_options(LINKER:-z,pack-relative-relocs)
diff --git a/Kernel/CommandLine.cpp b/Kernel/CommandLine.cpp
index dd08f41f64..51162cfa9f 100644
--- a/Kernel/CommandLine.cpp
+++ b/Kernel/CommandLine.cpp
@@ -6,9 +6,9 @@
#include <AK/StringBuilder.h>
#include <Kernel/CommandLine.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Sections.h>
-#include <Kernel/StdLib.h>
namespace Kernel {
diff --git a/Kernel/CommandLine.h b/Kernel/CommandLine.h
index decaf2aae2..98395eab2e 100644
--- a/Kernel/CommandLine.h
+++ b/Kernel/CommandLine.h
@@ -9,7 +9,7 @@
#include <AK/HashMap.h>
#include <AK/Optional.h>
#include <AK/Vector.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel {
diff --git a/Kernel/Devices/AsyncDeviceRequest.h b/Kernel/Devices/AsyncDeviceRequest.h
index a2f1a9b5ce..e5134b1f9d 100644
--- a/Kernel/Devices/AsyncDeviceRequest.h
+++ b/Kernel/Devices/AsyncDeviceRequest.h
@@ -8,11 +8,11 @@
#include <AK/IntrusiveList.h>
#include <Kernel/Library/NonnullLockRefPtr.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Thread.h>
#include <Kernel/Tasks/WaitQueue.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/Devices/Audio/AC97.cpp b/Kernel/Devices/Audio/AC97.cpp
index 3b85103c77..75bc7e7125 100644
--- a/Kernel/Devices/Audio/AC97.cpp
+++ b/Kernel/Devices/Audio/AC97.cpp
@@ -8,7 +8,6 @@
#include <Kernel/Arch/Delay.h>
#include <Kernel/Devices/Audio/AC97.h>
#include <Kernel/Devices/DeviceManagement.h>
-#include <Kernel/IOWindow.h>
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Memory/AnonymousVMObject.h>
diff --git a/Kernel/Devices/Audio/AC97.h b/Kernel/Devices/Audio/AC97.h
index 5477cf6a8d..9e1c5ea2d4 100644
--- a/Kernel/Devices/Audio/AC97.h
+++ b/Kernel/Devices/Audio/AC97.h
@@ -12,8 +12,8 @@
#include <Kernel/Bus/PCI/Device.h>
#include <Kernel/Devices/Audio/Controller.h>
#include <Kernel/Devices/CharacterDevice.h>
-#include <Kernel/IOWindow.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Locking/SpinlockProtected.h>
namespace Kernel {
diff --git a/Kernel/Devices/Audio/IntelHDA/Codec.h b/Kernel/Devices/Audio/IntelHDA/Codec.h
index f1dd94d0da..3c05c23111 100644
--- a/Kernel/Devices/Audio/IntelHDA/Codec.h
+++ b/Kernel/Devices/Audio/IntelHDA/Codec.h
@@ -14,7 +14,7 @@
#include <AK/RefPtr.h>
#include <AK/Vector.h>
#include <Kernel/Devices/Audio/IntelHDA/Format.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel::Audio::IntelHDA {
diff --git a/Kernel/Devices/Audio/IntelHDA/Controller.h b/Kernel/Devices/Audio/IntelHDA/Controller.h
index e747453679..b8fc5002b9 100644
--- a/Kernel/Devices/Audio/IntelHDA/Controller.h
+++ b/Kernel/Devices/Audio/IntelHDA/Controller.h
@@ -16,7 +16,7 @@
#include <Kernel/Devices/Audio/Controller.h>
#include <Kernel/Devices/Audio/IntelHDA/OutputPath.h>
#include <Kernel/Devices/Audio/IntelHDA/RingBuffer.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
namespace Kernel::Audio::IntelHDA {
diff --git a/Kernel/Devices/Audio/IntelHDA/OutputPath.h b/Kernel/Devices/Audio/IntelHDA/OutputPath.h
index 90ff28f6e5..7d6e8b57b4 100644
--- a/Kernel/Devices/Audio/IntelHDA/OutputPath.h
+++ b/Kernel/Devices/Audio/IntelHDA/OutputPath.h
@@ -12,7 +12,7 @@
#include <AK/Vector.h>
#include <Kernel/Devices/Audio/Channel.h>
#include <Kernel/Devices/Audio/IntelHDA/Stream.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel::Audio::IntelHDA {
diff --git a/Kernel/Devices/Audio/IntelHDA/RingBuffer.h b/Kernel/Devices/Audio/IntelHDA/RingBuffer.h
index cb269ea552..cb9b3d2c2f 100644
--- a/Kernel/Devices/Audio/IntelHDA/RingBuffer.h
+++ b/Kernel/Devices/Audio/IntelHDA/RingBuffer.h
@@ -7,7 +7,7 @@
#pragma once
#include <Kernel/Devices/Audio/IntelHDA/Timing.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
namespace Kernel::Audio::IntelHDA {
diff --git a/Kernel/Devices/Audio/IntelHDA/Stream.h b/Kernel/Devices/Audio/IntelHDA/Stream.h
index eb61165a19..45cdaf247f 100644
--- a/Kernel/Devices/Audio/IntelHDA/Stream.h
+++ b/Kernel/Devices/Audio/IntelHDA/Stream.h
@@ -11,7 +11,7 @@
#include <AK/OwnPtr.h>
#include <Kernel/Devices/Audio/IntelHDA/Codec.h>
#include <Kernel/Devices/Audio/IntelHDA/Format.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Locking/SpinlockProtected.h>
namespace Kernel::Audio::IntelHDA {
diff --git a/Kernel/Devices/KCOVDevice.cpp b/Kernel/Devices/KCOVDevice.cpp
index b9e1eef277..e67fd17282 100644
--- a/Kernel/Devices/KCOVDevice.cpp
+++ b/Kernel/Devices/KCOVDevice.cpp
@@ -12,7 +12,7 @@
#include <Kernel/Devices/KCOVInstance.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
namespace Kernel {
diff --git a/Kernel/Devices/PCISerialDevice.cpp b/Kernel/Devices/PCISerialDevice.cpp
index c649dc37ab..db64084c45 100644
--- a/Kernel/Devices/PCISerialDevice.cpp
+++ b/Kernel/Devices/PCISerialDevice.cpp
@@ -6,7 +6,7 @@
#include <Kernel/Bus/PCI/API.h>
#include <Kernel/Devices/PCISerialDevice.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Sections.h>
namespace Kernel {
diff --git a/Kernel/Devices/SerialDevice.cpp b/Kernel/Devices/SerialDevice.cpp
index ea5ac24cf3..1432b6fc7d 100644
--- a/Kernel/Devices/SerialDevice.cpp
+++ b/Kernel/Devices/SerialDevice.cpp
@@ -7,7 +7,7 @@
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Devices/SerialDevice.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Sections.h>
namespace Kernel {
diff --git a/Kernel/Devices/SerialDevice.h b/Kernel/Devices/SerialDevice.h
index 3d1866dd95..5802872830 100644
--- a/Kernel/Devices/SerialDevice.h
+++ b/Kernel/Devices/SerialDevice.h
@@ -7,7 +7,7 @@
#pragma once
#include <Kernel/Devices/CharacterDevice.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
namespace Kernel {
diff --git a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp
index 261665c379..c82fb5054a 100644
--- a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp
+++ b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp
@@ -13,7 +13,7 @@
#include <Kernel/Devices/Storage/ATA/Definitions.h>
#include <Kernel/Devices/Storage/ATA/GenericIDE/Channel.h>
#include <Kernel/Devices/Storage/ATA/GenericIDE/Controller.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Sections.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h
index d8501ec224..73834d4d8c 100644
--- a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h
+++ b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h
@@ -22,8 +22,8 @@
#include <Kernel/Devices/Storage/ATA/ATADevice.h>
#include <Kernel/Devices/Storage/ATA/ATAPort.h>
#include <Kernel/Devices/Storage/StorageDevice.h>
-#include <Kernel/IOWindow.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Library/LockRefPtr.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Memory/PhysicalAddress.h>
diff --git a/Kernel/Devices/Storage/NVMe/NVMeQueue.cpp b/Kernel/Devices/Storage/NVMe/NVMeQueue.cpp
index d9040d0109..9e9cb5bbde 100644
--- a/Kernel/Devices/Storage/NVMe/NVMeQueue.cpp
+++ b/Kernel/Devices/Storage/NVMe/NVMeQueue.cpp
@@ -9,7 +9,7 @@
#include <Kernel/Devices/Storage/NVMe/NVMeInterruptQueue.h>
#include <Kernel/Devices/Storage/NVMe/NVMePollQueue.h>
#include <Kernel/Devices/Storage/NVMe/NVMeQueue.h>
-#include <Kernel/StdLib.h>
+#include <Kernel/Library/StdLib.h>
namespace Kernel {
ErrorOr<NonnullLockRefPtr<NVMeQueue>> NVMeQueue::try_create(NVMeController& device, u16 qid, u8 irq, u32 q_depth, OwnPtr<Memory::Region> cq_dma_region, OwnPtr<Memory::Region> sq_dma_region, Memory::TypedMapping<DoorbellRegister volatile> db_regs, QueueType queue_type)
diff --git a/Kernel/Devices/Storage/SD/SDHostController.cpp b/Kernel/Devices/Storage/SD/SDHostController.cpp
index 227eb6511b..582703cb3c 100644
--- a/Kernel/Devices/Storage/SD/SDHostController.cpp
+++ b/Kernel/Devices/Storage/SD/SDHostController.cpp
@@ -10,7 +10,6 @@
#include <Kernel/Devices/Storage/SD/Commands.h>
#include <Kernel/Devices/Storage/SD/SDHostController.h>
#include <Kernel/Devices/Storage/StorageManagement.h>
-#include <Kernel/Panic.h>
#include <Kernel/Time/TimeManagement.h>
#if ARCH(AARCH64)
# include <Kernel/Arch/aarch64/RPi/SDHostController.h>
diff --git a/Kernel/Devices/Storage/StorageManagement.cpp b/Kernel/Devices/Storage/StorageManagement.cpp
index 590db613f0..c4414a0f12 100644
--- a/Kernel/Devices/Storage/StorageManagement.cpp
+++ b/Kernel/Devices/Storage/StorageManagement.cpp
@@ -30,7 +30,7 @@
#include <Kernel/Devices/Storage/StorageManagement.h>
#include <Kernel/FileSystem/Ext2FS/FileSystem.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <LibPartition/EBRPartitionTable.h>
#include <LibPartition/GUIDPartitionTable.h>
#include <LibPartition/MBRPartitionTable.h>
diff --git a/Kernel/FileSystem/Custody.h b/Kernel/FileSystem/Custody.h
index 5abed86fe9..7dac3a9a41 100644
--- a/Kernel/FileSystem/Custody.h
+++ b/Kernel/FileSystem/Custody.h
@@ -10,7 +10,7 @@
#include <AK/IntrusiveList.h>
#include <AK/RefPtr.h>
#include <Kernel/Forward.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
#include <Kernel/Library/ListedRefCounted.h>
#include <Kernel/Locking/SpinlockProtected.h>
diff --git a/Kernel/FileSystem/Ext2FS/DirectoryEntry.h b/Kernel/FileSystem/Ext2FS/DirectoryEntry.h
index 53d8f04504..cf522c4ce7 100644
--- a/Kernel/FileSystem/Ext2FS/DirectoryEntry.h
+++ b/Kernel/FileSystem/Ext2FS/DirectoryEntry.h
@@ -9,7 +9,7 @@
#include <AK/OwnPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/Inode.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Ext2FS/FileSystem.h b/Kernel/FileSystem/Ext2FS/FileSystem.h
index 760c46bcdb..08c75268a7 100644
--- a/Kernel/FileSystem/Ext2FS/FileSystem.h
+++ b/Kernel/FileSystem/Ext2FS/FileSystem.h
@@ -11,7 +11,7 @@
#include <Kernel/FileSystem/BlockBasedFileSystem.h>
#include <Kernel/FileSystem/Ext2FS/Definitions.h>
#include <Kernel/FileSystem/Inode.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
#include <Kernel/UnixTypes.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/FATFS/FileSystem.h b/Kernel/FileSystem/FATFS/FileSystem.h
index bedf8a7bc0..7b0949f5c0 100644
--- a/Kernel/FileSystem/FATFS/FileSystem.h
+++ b/Kernel/FileSystem/FATFS/FileSystem.h
@@ -13,7 +13,7 @@
#include <Kernel/FileSystem/FATFS/Definitions.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/Forward.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/FATFS/Inode.cpp b/Kernel/FileSystem/FATFS/Inode.cpp
index 5a3c253f66..33acb1e687 100644
--- a/Kernel/FileSystem/FATFS/Inode.cpp
+++ b/Kernel/FileSystem/FATFS/Inode.cpp
@@ -7,7 +7,7 @@
#include <AK/Time.h>
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/FATFS/Inode.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/FATFS/Inode.h b/Kernel/FileSystem/FATFS/Inode.h
index f5e7f1626a..16d9cf63fd 100644
--- a/Kernel/FileSystem/FATFS/Inode.h
+++ b/Kernel/FileSystem/FATFS/Inode.h
@@ -11,8 +11,8 @@
#include <Kernel/FileSystem/FATFS/Definitions.h>
#include <Kernel/FileSystem/FATFS/FileSystem.h>
#include <Kernel/FileSystem/Inode.h>
-#include <Kernel/KBuffer.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KBuffer.h>
+#include <Kernel/Library/KString.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/FIFO.h b/Kernel/FileSystem/FIFO.h
index 14a677d392..974c6a090c 100644
--- a/Kernel/FileSystem/FIFO.h
+++ b/Kernel/FileSystem/FIFO.h
@@ -6,8 +6,8 @@
#pragma once
-#include <Kernel/DoubleBuffer.h>
#include <Kernel/FileSystem/File.h>
+#include <Kernel/Library/DoubleBuffer.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Tasks/WaitQueue.h>
#include <Kernel/UnixTypes.h>
diff --git a/Kernel/FileSystem/File.h b/Kernel/FileSystem/File.h
index 6ecf7be4ec..f1601e8f3f 100644
--- a/Kernel/FileSystem/File.h
+++ b/Kernel/FileSystem/File.h
@@ -13,9 +13,9 @@
#include <Kernel/Forward.h>
#include <Kernel/Library/LockWeakable.h>
#include <Kernel/Library/NonnullLockRefPtr.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Memory/VirtualAddress.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/FileSystem.h b/Kernel/FileSystem/FileSystem.h
index 4c6c1253c7..f4b54d9d83 100644
--- a/Kernel/FileSystem/FileSystem.h
+++ b/Kernel/FileSystem/FileSystem.h
@@ -12,9 +12,9 @@
#include <Kernel/FileSystem/InodeIdentifier.h>
#include <Kernel/Forward.h>
#include <Kernel/Library/LockRefPtr.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ISO9660FS/DirectoryEntry.h b/Kernel/FileSystem/ISO9660FS/DirectoryEntry.h
index e46d610eb7..efb82f5907 100644
--- a/Kernel/FileSystem/ISO9660FS/DirectoryEntry.h
+++ b/Kernel/FileSystem/ISO9660FS/DirectoryEntry.h
@@ -7,7 +7,7 @@
#pragma once
#include <AK/Types.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ISO9660FS/DirectoryIterator.cpp b/Kernel/FileSystem/ISO9660FS/DirectoryIterator.cpp
index a901122814..b127d85c7a 100644
--- a/Kernel/FileSystem/ISO9660FS/DirectoryIterator.cpp
+++ b/Kernel/FileSystem/ISO9660FS/DirectoryIterator.cpp
@@ -7,7 +7,7 @@
#include <AK/Types.h>
#include <Kernel/FileSystem/ISO9660FS/Definitions.h>
#include <Kernel/FileSystem/ISO9660FS/DirectoryIterator.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ISO9660FS/DirectoryIterator.h b/Kernel/FileSystem/ISO9660FS/DirectoryIterator.h
index ae771e59cd..783a57ac16 100644
--- a/Kernel/FileSystem/ISO9660FS/DirectoryIterator.h
+++ b/Kernel/FileSystem/ISO9660FS/DirectoryIterator.h
@@ -10,7 +10,7 @@
#include <Kernel/FileSystem/ISO9660FS/Definitions.h>
#include <Kernel/FileSystem/ISO9660FS/DirectoryEntry.h>
#include <Kernel/FileSystem/ISO9660FS/FileSystem.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ISO9660FS/FileSystem.h b/Kernel/FileSystem/ISO9660FS/FileSystem.h
index 6a16b4595c..ce99465ccb 100644
--- a/Kernel/FileSystem/ISO9660FS/FileSystem.h
+++ b/Kernel/FileSystem/ISO9660FS/FileSystem.h
@@ -16,7 +16,7 @@
#include <Kernel/FileSystem/ISO9660FS/Definitions.h>
#include <Kernel/FileSystem/ISO9660FS/DirectoryEntry.h>
#include <Kernel/FileSystem/Inode.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
#include <Kernel/Library/NonnullLockRefPtr.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp
index 221ebee6d1..3cce39ea8c 100644
--- a/Kernel/FileSystem/Inode.cpp
+++ b/Kernel/FileSystem/Inode.cpp
@@ -14,7 +14,7 @@
#include <Kernel/FileSystem/InodeWatcher.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Net/LocalSocket.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/FileSystem/OpenFileDescription.h b/Kernel/FileSystem/OpenFileDescription.h
index e4f02325a4..1b02473c4d 100644
--- a/Kernel/FileSystem/OpenFileDescription.h
+++ b/Kernel/FileSystem/OpenFileDescription.h
@@ -14,7 +14,7 @@
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/FileSystem/InodeMetadata.h>
#include <Kernel/Forward.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
#include <Kernel/Memory/VirtualAddress.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Plan9FS/FileSystem.h b/Kernel/FileSystem/Plan9FS/FileSystem.h
index abb7226f49..3be74cd698 100644
--- a/Kernel/FileSystem/Plan9FS/FileSystem.h
+++ b/Kernel/FileSystem/Plan9FS/FileSystem.h
@@ -11,7 +11,7 @@
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/FileSystem/Plan9FS/Definitions.h>
#include <Kernel/FileSystem/Plan9FS/Message.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Plan9FS/Inode.h b/Kernel/FileSystem/Plan9FS/Inode.h
index 9747cc330d..14bd29e628 100644
--- a/Kernel/FileSystem/Plan9FS/Inode.h
+++ b/Kernel/FileSystem/Plan9FS/Inode.h
@@ -10,7 +10,7 @@
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/FileSystem/Plan9FS/FileSystem.h>
#include <Kernel/FileSystem/Plan9FS/Message.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Plan9FS/Message.h b/Kernel/FileSystem/Plan9FS/Message.h
index 41d5f6f91d..33d953228a 100644
--- a/Kernel/FileSystem/Plan9FS/Message.h
+++ b/Kernel/FileSystem/Plan9FS/Message.h
@@ -8,8 +8,8 @@
#include <AK/Types.h>
#include <Kernel/FileSystem/Plan9FS/Definitions.h>
-#include <Kernel/KBuffer.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ProcFS/Inode.h b/Kernel/FileSystem/ProcFS/Inode.h
index f8517b5d99..52889b9d62 100644
--- a/Kernel/FileSystem/ProcFS/Inode.h
+++ b/Kernel/FileSystem/ProcFS/Inode.h
@@ -11,7 +11,7 @@
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/ProcFS/Definitions.h>
#include <Kernel/FileSystem/ProcFS/FileSystem.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
#include <Kernel/UnixTypes.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ProcFS/ProcessExposed.cpp b/Kernel/FileSystem/ProcFS/ProcessExposed.cpp
index 302d0ef927..34b563907d 100644
--- a/Kernel/FileSystem/ProcFS/ProcessExposed.cpp
+++ b/Kernel/FileSystem/ProcFS/ProcessExposed.cpp
@@ -10,7 +10,7 @@
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/ProcFS/Inode.h>
#include <Kernel/InterruptDisabler.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/TTY/TTY.h>
diff --git a/Kernel/FileSystem/SysFS/Component.cpp b/Kernel/FileSystem/SysFS/Component.cpp
index ced348f7a2..e1f6847f40 100644
--- a/Kernel/FileSystem/SysFS/Component.cpp
+++ b/Kernel/FileSystem/SysFS/Component.cpp
@@ -9,7 +9,7 @@
#include <Kernel/FileSystem/SysFS/Inode.h>
#include <Kernel/FileSystem/SysFS/LinkInode.h>
#include <Kernel/FileSystem/SysFS/Registry.h>
-#include <Kernel/KLexicalPath.h>
+#include <Kernel/Library/KLexicalPath.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h b/Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h
index f8eb5da191..63c489c8f6 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h
@@ -9,7 +9,7 @@
#include <AK/NonnullRefPtr.h>
#include <Kernel/Bus/PCI/Definitions.h>
#include <Kernel/FileSystem/SysFS/Component.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp
index cf3eda8d7f..fe91659116 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.cpp
@@ -6,7 +6,7 @@
#include <Kernel/FileSystem/SysFS/Registry.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/USB/BusDirectory.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h
index afdcf32399..0a4af580e5 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h
@@ -8,8 +8,8 @@
#include <Kernel/Bus/USB/USBDevice.h>
#include <Kernel/FileSystem/SysFS/Component.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/KString.h>
#include <Kernel/Locking/Mutex.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/DeviceComponent.h b/Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/DeviceComponent.h
index 6859ac0ff5..1c34694d80 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/DeviceComponent.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/DeviceComponent.h
@@ -8,7 +8,7 @@
#include <AK/IntrusiveList.h>
#include <Kernel/FileSystem/SysFS/Component.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/SymbolicLinkDeviceComponent.h b/Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/SymbolicLinkDeviceComponent.h
index 0a44acacb0..2c80b0ee69 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/SymbolicLinkDeviceComponent.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/SymbolicLinkDeviceComponent.h
@@ -10,7 +10,7 @@
#include <Kernel/FileSystem/SysFS/Component.h>
#include <Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/BlockDevicesDirectory.h>
#include <Kernel/FileSystem/SysFS/Subsystems/DeviceIdentifiers/CharacterDevicesDirectory.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceAttribute.h b/Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceAttribute.h
index f1db9cb30a..a3fb1261ce 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceAttribute.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceAttribute.h
@@ -9,7 +9,7 @@
#include <Kernel/FileSystem/SysFS/Component.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceDirectory.h>
#include <Kernel/Graphics/DisplayConnector.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceDirectory.h b/Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceDirectory.h
index e22b178b9a..dc1c2208ae 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceDirectory.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Devices/Graphics/DisplayConnector/DeviceDirectory.h
@@ -8,7 +8,7 @@
#include <Kernel/FileSystem/SysFS/Component.h>
#include <Kernel/Graphics/DisplayConnector.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceAttribute.h b/Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceAttribute.h
index 9682fb0172..31d9210133 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceAttribute.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceAttribute.h
@@ -8,7 +8,7 @@
#include <Kernel/FileSystem/SysFS/Component.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceDirectory.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceDirectory.h b/Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceDirectory.h
index b7cb1c5b3d..f17ceb46ef 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceDirectory.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Devices/Storage/DeviceDirectory.h
@@ -8,7 +8,7 @@
#include <Kernel/Devices/Storage/StorageDevice.h>
#include <Kernel/FileSystem/SysFS/Component.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.cpp b/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.cpp
index b503116e7f..e55a4a1fb9 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.cpp
@@ -8,7 +8,7 @@
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.h>
#include <Kernel/Firmware/BIOS.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.h b/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.h
index f1406e6ef4..8100bb3848 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Component.h
@@ -10,7 +10,7 @@
#include <AK/Types.h>
#include <AK/Vector.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Firmware/Directory.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
#include <Kernel/Library/LockRefPtr.h>
#include <Kernel/Memory/PhysicalAddress.h>
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp b/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp
index bc1532bd94..a48ead7890 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.cpp
@@ -10,7 +10,7 @@
#include <Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/DMI/Definitions.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Firmware/BIOS/Directory.h>
#include <Kernel/Firmware/BIOS.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.h
index 28d123fe50..fe994c2112 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/CPUInfo.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.h
index 3deadc4cc2..1bbcd2b6d5 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.h
@@ -10,7 +10,7 @@
#include <AK/Error.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Component.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/Directory.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/Directory.cpp
index c8be940c9e..483893f652 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/Directory.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/Directory.cpp
@@ -10,7 +10,7 @@
#include <Kernel/FileSystem/SysFS/Component.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/Directory.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/DiskUsage.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/DiskUsage.h
index 237f883682..52608ad7d4 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/DiskUsage.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/DiskUsage.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h
index ac690d9d00..9cc9351778 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h
@@ -13,9 +13,9 @@
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/SysFS/Component.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Locking/Mutex.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Interrupts.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Interrupts.h
index b62fad7537..e75dfdf759 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Interrupts.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Interrupts.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Jails.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Jails.h
index 5e67a42f59..219c8e85aa 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Jails.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Jails.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Keymap.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Keymap.h
index 11df9b94ca..b4ea1a7460 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Keymap.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Keymap.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Log.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Log.h
index 1655d87073..2b1f51aee4 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Log.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Log.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/MemoryStatus.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/MemoryStatus.h
index 3239ac0b55..f4416b6cf3 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/MemoryStatus.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/MemoryStatus.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/ARP.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/ARP.h
index 92c6de2789..cb7b5e1d8c 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/ARP.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/ARP.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Adapters.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Adapters.h
index 9cbb07c2ce..2929e00819 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Adapters.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Adapters.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Local.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Local.h
index 7d037b40bb..6ae04a07e4 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Local.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Local.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Route.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Route.h
index 8c2d2043ac..20369de970 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Route.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/Route.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.h
index 55b1f8b941..4cd5942a97 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.h
index 4d35e6f5f1..2696e12d3b 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.h
index 5d7637a17b..8e3d7bef21 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.h
@@ -11,7 +11,7 @@
#include <AK/Types.h>
#include <AK/Vector.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Directory.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
#include <Kernel/Memory/MappedROM.h>
#include <Kernel/Memory/PhysicalAddress.h>
#include <Kernel/Memory/Region.h>
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.h
index 4f8b3bd6c7..d75165940f 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Profile.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Profile.h
index 340ceace4a..1aec67990f 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Profile.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Profile.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.h
index 01f8f1044a..b7c552eacd 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Uptime.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Uptime.h
index 5a8eb002f1..6e6ed4b819 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Uptime.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Uptime.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h
index 08c3cec526..89d572cf8b 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h
@@ -15,10 +15,10 @@
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Time/TimeManagement.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CapsLockRemap.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CapsLockRemap.h
index 5b96feec97..fbc196c3c7 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CapsLockRemap.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CapsLockRemap.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Locking/Spinlock.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CoredumpDirectory.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CoredumpDirectory.h
index 9cc34251ac..2ddac32d1e 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CoredumpDirectory.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/CoredumpDirectory.h
@@ -9,7 +9,7 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.h
index 5887589e6e..0c1d2e31de 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.h
@@ -9,8 +9,8 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Locking/Spinlock.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.h
index c43f3f7533..f9dd36c883 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.h
@@ -16,11 +16,11 @@
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/KString.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Time/TimeManagement.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/UBSANDeadly.h b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/UBSANDeadly.h
index 1e7289fc24..4259cf5c1b 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/UBSANDeadly.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/UBSANDeadly.h
@@ -9,7 +9,7 @@
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h>
-#include <Kernel/UserOrKernelBuffer.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/UnveilNode.h b/Kernel/FileSystem/UnveilNode.h
index 69d4179239..da541e2e34 100644
--- a/Kernel/FileSystem/UnveilNode.h
+++ b/Kernel/FileSystem/UnveilNode.h
@@ -7,7 +7,7 @@
#pragma once
#include <AK/Trie.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp
index fc35552053..7e8e72c136 100644
--- a/Kernel/FileSystem/VirtualFileSystem.cpp
+++ b/Kernel/FileSystem/VirtualFileSystem.cpp
@@ -18,8 +18,8 @@
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/KLexicalPath.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Library/KLexicalPath.h>
#include <Kernel/Sections.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/Firmware/ACPI/Parser.cpp b/Kernel/Firmware/ACPI/Parser.cpp
index 21524df617..9d7c1d6aa4 100644
--- a/Kernel/Firmware/ACPI/Parser.cpp
+++ b/Kernel/Firmware/ACPI/Parser.cpp
@@ -18,9 +18,9 @@
#include <Kernel/Debug.h>
#include <Kernel/Firmware/ACPI/Parser.h>
#include <Kernel/Firmware/BIOS.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
-#include <Kernel/StdLib.h>
namespace Kernel::ACPI {
diff --git a/Kernel/Firmware/MultiProcessor/Parser.cpp b/Kernel/Firmware/MultiProcessor/Parser.cpp
index 2add19d74e..0dd6a4e8f5 100644
--- a/Kernel/Firmware/MultiProcessor/Parser.cpp
+++ b/Kernel/Firmware/MultiProcessor/Parser.cpp
@@ -11,9 +11,9 @@
#include <Kernel/Debug.h>
#include <Kernel/Firmware/BIOS.h>
#include <Kernel/Firmware/MultiProcessor/Parser.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
-#include <Kernel/StdLib.h>
namespace Kernel {
diff --git a/Kernel/Graphics/VMWare/GraphicsAdapter.cpp b/Kernel/Graphics/VMWare/GraphicsAdapter.cpp
index 15f86f8286..00c5c8fb2d 100644
--- a/Kernel/Graphics/VMWare/GraphicsAdapter.cpp
+++ b/Kernel/Graphics/VMWare/GraphicsAdapter.cpp
@@ -14,7 +14,7 @@
#include <Kernel/Graphics/VMWare/Definitions.h>
#include <Kernel/Graphics/VMWare/DisplayConnector.h>
#include <Kernel/Graphics/VMWare/GraphicsAdapter.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
diff --git a/Kernel/Graphics/VMWare/GraphicsAdapter.h b/Kernel/Graphics/VMWare/GraphicsAdapter.h
index 65ad91a428..dc8e503a38 100644
--- a/Kernel/Graphics/VMWare/GraphicsAdapter.h
+++ b/Kernel/Graphics/VMWare/GraphicsAdapter.h
@@ -10,7 +10,7 @@
#include <Kernel/Bus/PCI/Device.h>
#include <Kernel/Graphics/GenericGraphicsAdapter.h>
#include <Kernel/Graphics/VMWare/Definitions.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Locking/Spinlock.h>
#include <Kernel/Memory/PhysicalAddress.h>
#include <Kernel/Memory/TypedMapping.h>
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp
index 6330550570..5266a47b8f 100644
--- a/Kernel/Heap/kmalloc.cpp
+++ b/Kernel/Heap/kmalloc.cpp
@@ -11,12 +11,12 @@
#include <Kernel/Heap/Heap.h>
#include <Kernel/Heap/kmalloc.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Library/Panic.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Locking/Spinlock.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Sections.h>
-#include <Kernel/StdLib.h>
#if ARCH(X86_64) || ARCH(AARCH64)
static constexpr size_t CHUNK_SIZE = 64;
diff --git a/Kernel/Interrupts/GenericInterruptHandler.cpp b/Kernel/Interrupts/GenericInterruptHandler.cpp
index 8e618ec1ff..530f60154e 100644
--- a/Kernel/Interrupts/GenericInterruptHandler.cpp
+++ b/Kernel/Interrupts/GenericInterruptHandler.cpp
@@ -6,8 +6,8 @@
#include <Kernel/Arch/InterruptManagement.h>
#include <Kernel/Arch/Interrupts.h>
-#include <Kernel/Assertions.h>
#include <Kernel/Interrupts/GenericInterruptHandler.h>
+#include <Kernel/Library/Assertions.h>
namespace Kernel {
GenericInterruptHandler& GenericInterruptHandler::from(u8 interrupt_number)
diff --git a/Kernel/Interrupts/SharedIRQHandler.cpp b/Kernel/Interrupts/SharedIRQHandler.cpp
index 64212e2971..7cb41dbe0c 100644
--- a/Kernel/Interrupts/SharedIRQHandler.cpp
+++ b/Kernel/Interrupts/SharedIRQHandler.cpp
@@ -5,10 +5,10 @@
*/
#include <Kernel/Arch/InterruptManagement.h>
-#include <Kernel/Assertions.h>
#include <Kernel/Debug.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Interrupts/SharedIRQHandler.h>
+#include <Kernel/Library/Assertions.h>
#include <Kernel/Sections.h>
namespace Kernel {
diff --git a/Kernel/Interrupts/UnhandledInterruptHandler.cpp b/Kernel/Interrupts/UnhandledInterruptHandler.cpp
index 17571047d3..8ef0a7b3d3 100644
--- a/Kernel/Interrupts/UnhandledInterruptHandler.cpp
+++ b/Kernel/Interrupts/UnhandledInterruptHandler.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/Interrupts/UnhandledInterruptHandler.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
namespace Kernel {
UnhandledInterruptHandler::UnhandledInterruptHandler(u8 interrupt_vector)
diff --git a/Kernel/Assertions.h b/Kernel/Library/Assertions.h
index aa0094f5e2..aa0094f5e2 100644
--- a/Kernel/Assertions.h
+++ b/Kernel/Library/Assertions.h
diff --git a/Kernel/DoubleBuffer.cpp b/Kernel/Library/DoubleBuffer.cpp
index 1e8243f725..b0624acaff 100644
--- a/Kernel/DoubleBuffer.cpp
+++ b/Kernel/Library/DoubleBuffer.cpp
@@ -5,8 +5,8 @@
*/
#include <AK/StringView.h>
-#include <Kernel/DoubleBuffer.h>
#include <Kernel/InterruptDisabler.h>
+#include <Kernel/Library/DoubleBuffer.h>
namespace Kernel {
diff --git a/Kernel/DoubleBuffer.h b/Kernel/Library/DoubleBuffer.h
index ce4c9f1595..56e71deeab 100644
--- a/Kernel/DoubleBuffer.h
+++ b/Kernel/Library/DoubleBuffer.h
@@ -7,10 +7,10 @@
#pragma once
#include <AK/Types.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Tasks/Thread.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/IOWindow.cpp b/Kernel/Library/IOWindow.cpp
index aa3fbe1225..b89b94148a 100644
--- a/Kernel/IOWindow.cpp
+++ b/Kernel/Library/IOWindow.cpp
@@ -6,7 +6,7 @@
#include <Kernel/Bus/PCI/API.h>
#include <Kernel/Bus/PCI/Definitions.h>
-#include <Kernel/IOWindow.h>
+#include <Kernel/Library/IOWindow.h>
namespace Kernel {
diff --git a/Kernel/IOWindow.h b/Kernel/Library/IOWindow.h
index d07793681b..d07793681b 100644
--- a/Kernel/IOWindow.h
+++ b/Kernel/Library/IOWindow.h
diff --git a/Kernel/KBuffer.h b/Kernel/Library/KBuffer.h
index 77a1729b8a..b5694b3a92 100644
--- a/Kernel/KBuffer.h
+++ b/Kernel/Library/KBuffer.h
@@ -17,8 +17,8 @@
#include <AK/Assertions.h>
#include <AK/StringView.h>
+#include <Kernel/Library/StdLib.h> // For memcpy. FIXME: Make memcpy less expensive to access a declaration of in the Kernel.
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/StdLib.h> // For memcpy. FIXME: Make memcpy less expensive to access a declaration of in the Kernel.
namespace Kernel {
diff --git a/Kernel/KBufferBuilder.cpp b/Kernel/Library/KBufferBuilder.cpp
index 0f1912bad3..e772096aff 100644
--- a/Kernel/KBufferBuilder.cpp
+++ b/Kernel/Library/KBufferBuilder.cpp
@@ -5,7 +5,7 @@
*/
#include <AK/StdLibExtras.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
namespace Kernel {
diff --git a/Kernel/KBufferBuilder.h b/Kernel/Library/KBufferBuilder.h
index 4a8e79607d..9b9a159d1f 100644
--- a/Kernel/KBufferBuilder.h
+++ b/Kernel/Library/KBufferBuilder.h
@@ -8,7 +8,7 @@
#include <AK/StringBuilder.h>
#include <AK/StringView.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
namespace Kernel {
diff --git a/Kernel/KLexicalPath.cpp b/Kernel/Library/KLexicalPath.cpp
index 085cfbe771..011cd1c329 100644
--- a/Kernel/KLexicalPath.cpp
+++ b/Kernel/Library/KLexicalPath.cpp
@@ -5,7 +5,7 @@
*/
#include <AK/Vector.h>
-#include <Kernel/KLexicalPath.h>
+#include <Kernel/Library/KLexicalPath.h>
namespace Kernel::KLexicalPath {
diff --git a/Kernel/KLexicalPath.h b/Kernel/Library/KLexicalPath.h
index 73c29b2d10..abf7eb0591 100644
--- a/Kernel/KLexicalPath.h
+++ b/Kernel/Library/KLexicalPath.h
@@ -7,7 +7,7 @@
#pragma once
#include <AK/StringView.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
namespace Kernel::KLexicalPath {
diff --git a/Kernel/KString.cpp b/Kernel/Library/KString.cpp
index dbfad78d4c..8469de75a1 100644
--- a/Kernel/KString.cpp
+++ b/Kernel/Library/KString.cpp
@@ -6,7 +6,7 @@
#include <AK/Format.h>
#include <AK/StringBuilder.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
extern bool g_in_early_boot;
diff --git a/Kernel/KString.h b/Kernel/Library/KString.h
index 7905936dbe..7905936dbe 100644
--- a/Kernel/KString.h
+++ b/Kernel/Library/KString.h
diff --git a/Kernel/Library/LockRefPtr.h b/Kernel/Library/LockRefPtr.h
index 819acfd874..6486b0fa7c 100644
--- a/Kernel/Library/LockRefPtr.h
+++ b/Kernel/Library/LockRefPtr.h
@@ -16,7 +16,7 @@
#include <Kernel/Library/NonnullLockRefPtr.h>
#ifdef KERNEL
# include <Kernel/Arch/Processor.h>
-# include <Kernel/ScopedCritical.h>
+# include <Kernel/Library/ScopedCritical.h>
#endif
#define LOCKREFPTR_SCRUB_BYTE 0xa0
diff --git a/Kernel/Library/LockWeakable.h b/Kernel/Library/LockWeakable.h
index 6c146e665b..0869ae4018 100644
--- a/Kernel/Library/LockWeakable.h
+++ b/Kernel/Library/LockWeakable.h
@@ -12,7 +12,7 @@
#include <AK/StdLibExtras.h>
#include <Kernel/Arch/Processor.h>
#include <Kernel/Library/LockRefPtr.h>
-#include <Kernel/ScopedCritical.h>
+#include <Kernel/Library/ScopedCritical.h>
namespace AK {
diff --git a/Kernel/MiniStdLib.cpp b/Kernel/Library/MiniStdLib.cpp
index eff7b300cf..023f9f1155 100644
--- a/Kernel/MiniStdLib.cpp
+++ b/Kernel/Library/MiniStdLib.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/StdLib.h>
+#include <Kernel/Library/StdLib.h>
extern "C" {
diff --git a/Kernel/Library/NonnullLockRefPtr.h b/Kernel/Library/NonnullLockRefPtr.h
index 643fec04de..3b915692fa 100644
--- a/Kernel/Library/NonnullLockRefPtr.h
+++ b/Kernel/Library/NonnullLockRefPtr.h
@@ -14,7 +14,7 @@
#include <AK/Types.h>
#ifdef KERNEL
# include <Kernel/Arch/Processor.h>
-# include <Kernel/ScopedCritical.h>
+# include <Kernel/Library/ScopedCritical.h>
#endif
#define NONNULLLOCKREFPTR_SCRUB_BYTE 0xa1
diff --git a/Kernel/Panic.cpp b/Kernel/Library/Panic.cpp
index 0fed4872e3..227cc1b22a 100644
--- a/Kernel/Panic.cpp
+++ b/Kernel/Library/Panic.cpp
@@ -13,7 +13,7 @@
#endif
#include <Kernel/CommandLine.h>
#include <Kernel/KSyms.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/Panic.h b/Kernel/Library/Panic.h
index 0829964026..0829964026 100644
--- a/Kernel/Panic.h
+++ b/Kernel/Library/Panic.h
diff --git a/Kernel/ScopedCritical.cpp b/Kernel/Library/ScopedCritical.cpp
index c97478c6d5..164a036233 100644
--- a/Kernel/ScopedCritical.cpp
+++ b/Kernel/Library/ScopedCritical.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/ScopedCritical.h>
+#include <Kernel/Library/ScopedCritical.h>
#include <Kernel/Arch/Processor.h>
diff --git a/Kernel/ScopedCritical.h b/Kernel/Library/ScopedCritical.h
index 678069e4f6..678069e4f6 100644
--- a/Kernel/ScopedCritical.h
+++ b/Kernel/Library/ScopedCritical.h
diff --git a/Kernel/StdLib.cpp b/Kernel/Library/StdLib.cpp
index 6a984710e9..8f003672db 100644
--- a/Kernel/StdLib.cpp
+++ b/Kernel/Library/StdLib.cpp
@@ -9,8 +9,8 @@
#include <AK/Types.h>
#include <Kernel/Arch/SafeMem.h>
#include <Kernel/Arch/SmapDisabler.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/StdLib.h>
ErrorOr<NonnullOwnPtr<Kernel::KString>> try_copy_kstring_from_user(Userspace<char const*> user_str, size_t user_str_size)
{
diff --git a/Kernel/StdLib.h b/Kernel/Library/StdLib.h
index 7cdd2986ea..ead5b06c60 100644
--- a/Kernel/StdLib.h
+++ b/Kernel/Library/StdLib.h
@@ -11,7 +11,7 @@
#include <AK/Forward.h>
#include <AK/Time.h>
#include <AK/Userspace.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
#include <Kernel/UnixTypes.h>
ErrorOr<NonnullOwnPtr<Kernel::KString>> try_copy_kstring_from_user(Userspace<char const*>, size_t);
diff --git a/Kernel/UserOrKernelBuffer.cpp b/Kernel/Library/UserOrKernelBuffer.cpp
index 8235192402..0dcefa5a47 100644
--- a/Kernel/UserOrKernelBuffer.cpp
+++ b/Kernel/Library/UserOrKernelBuffer.cpp
@@ -5,8 +5,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/UserOrKernelBuffer.h b/Kernel/Library/UserOrKernelBuffer.h
index 7e6f8600bf..41f9fd4dad 100644
--- a/Kernel/UserOrKernelBuffer.h
+++ b/Kernel/Library/UserOrKernelBuffer.h
@@ -10,8 +10,8 @@
#include <AK/Types.h>
#include <AK/Userspace.h>
#include <Kernel/API/POSIX/errno.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/StdLib.h>
#include <Kernel/UnixTypes.h>
namespace Kernel {
diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp
index 78ac641315..d3e6344266 100644
--- a/Kernel/Memory/MemoryManager.cpp
+++ b/Kernel/Memory/MemoryManager.cpp
@@ -15,15 +15,15 @@
#include <Kernel/Heap/kmalloc.h>
#include <Kernel/InterruptDisabler.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Library/Panic.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/PhysicalRegion.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Multiboot.h>
-#include <Kernel/Panic.h>
#include <Kernel/Prekernel/Prekernel.h>
#include <Kernel/Sections.h>
-#include <Kernel/StdLib.h>
#include <Kernel/Tasks/Process.h>
extern u8 start_of_kernel_image[];
diff --git a/Kernel/Memory/PhysicalRegion.cpp b/Kernel/Memory/PhysicalRegion.cpp
index bae809e297..f2746c43cc 100644
--- a/Kernel/Memory/PhysicalRegion.cpp
+++ b/Kernel/Memory/PhysicalRegion.cpp
@@ -5,7 +5,7 @@
*/
#include <AK/BuiltinWrappers.h>
-#include <Kernel/Assertions.h>
+#include <Kernel/Library/Assertions.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/PhysicalRegion.h>
#include <Kernel/Memory/PhysicalZone.h>
diff --git a/Kernel/Memory/Region.cpp b/Kernel/Memory/Region.cpp
index afae1fc4ba..373914b0b0 100644
--- a/Kernel/Memory/Region.cpp
+++ b/Kernel/Memory/Region.cpp
@@ -10,11 +10,11 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/InterruptDisabler.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/Region.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
-#include <Kernel/Panic.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Tasks/Thread.h>
diff --git a/Kernel/Memory/Region.h b/Kernel/Memory/Region.h
index e613d8df64..d0573eeffe 100644
--- a/Kernel/Memory/Region.h
+++ b/Kernel/Memory/Region.h
@@ -11,7 +11,7 @@
#include <AK/IntrusiveList.h>
#include <AK/IntrusiveRedBlackTree.h>
#include <Kernel/Forward.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
#include <Kernel/Library/LockWeakable.h>
#include <Kernel/Locking/LockRank.h>
#include <Kernel/Memory/PageFaultResponse.h>
diff --git a/Kernel/Memory/RingBuffer.cpp b/Kernel/Memory/RingBuffer.cpp
index 045f61e6d5..e400f93709 100644
--- a/Kernel/Memory/RingBuffer.cpp
+++ b/Kernel/Memory/RingBuffer.cpp
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/RingBuffer.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel::Memory {
diff --git a/Kernel/Memory/RingBuffer.h b/Kernel/Memory/RingBuffer.h
index 7b35f7ac12..7e90512bf9 100644
--- a/Kernel/Memory/RingBuffer.h
+++ b/Kernel/Memory/RingBuffer.h
@@ -6,8 +6,8 @@
#pragma once
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Memory/PhysicalAddress.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel::Memory {
diff --git a/Kernel/Net/IPv4Socket.h b/Kernel/Net/IPv4Socket.h
index 29e425cd06..aa0b5878a2 100644
--- a/Kernel/Net/IPv4Socket.h
+++ b/Kernel/Net/IPv4Socket.h
@@ -8,8 +8,8 @@
#include <AK/HashMap.h>
#include <AK/SinglyLinkedList.h>
-#include <Kernel/DoubleBuffer.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/DoubleBuffer.h>
+#include <Kernel/Library/KBuffer.h>
#include <Kernel/Locking/MutexProtected.h>
#include <Kernel/Net/IPv4.h>
#include <Kernel/Net/IPv4SocketTuple.h>
diff --git a/Kernel/Net/IPv4SocketTuple.h b/Kernel/Net/IPv4SocketTuple.h
index c763a4ab7f..96b9e57d81 100644
--- a/Kernel/Net/IPv4SocketTuple.h
+++ b/Kernel/Net/IPv4SocketTuple.h
@@ -7,9 +7,9 @@
#pragma once
#include <AK/HashMap.h>
-#include <Kernel/DoubleBuffer.h>
-#include <Kernel/KBuffer.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/DoubleBuffer.h>
+#include <Kernel/Library/KBuffer.h>
+#include <Kernel/Library/KString.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Net/IPv4.h>
#include <Kernel/Net/Socket.h>
diff --git a/Kernel/Net/Intel/E1000ENetworkAdapter.h b/Kernel/Net/Intel/E1000ENetworkAdapter.h
index 5b8b45a22e..0de34aee56 100644
--- a/Kernel/Net/Intel/E1000ENetworkAdapter.h
+++ b/Kernel/Net/Intel/E1000ENetworkAdapter.h
@@ -9,8 +9,8 @@
#include <AK/OwnPtr.h>
#include <Kernel/Bus/PCI/Access.h>
#include <Kernel/Bus/PCI/Device.h>
-#include <Kernel/IOWindow.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Net/Intel/E1000NetworkAdapter.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Security/Random.h>
diff --git a/Kernel/Net/Intel/E1000NetworkAdapter.h b/Kernel/Net/Intel/E1000NetworkAdapter.h
index 143e0db120..c9d9e93f10 100644
--- a/Kernel/Net/Intel/E1000NetworkAdapter.h
+++ b/Kernel/Net/Intel/E1000NetworkAdapter.h
@@ -9,8 +9,8 @@
#include <AK/OwnPtr.h>
#include <Kernel/Bus/PCI/Access.h>
#include <Kernel/Bus/PCI/Device.h>
-#include <Kernel/IOWindow.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Security/Random.h>
diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp
index 1fc63ed932..d0688612cd 100644
--- a/Kernel/Net/LocalSocket.cpp
+++ b/Kernel/Net/LocalSocket.cpp
@@ -11,10 +11,10 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Locking/MutexProtected.h>
#include <Kernel/Net/LocalSocket.h>
-#include <Kernel/StdLib.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/UnixTypes.h>
diff --git a/Kernel/Net/LocalSocket.h b/Kernel/Net/LocalSocket.h
index 971649db86..ca0261a268 100644
--- a/Kernel/Net/LocalSocket.h
+++ b/Kernel/Net/LocalSocket.h
@@ -7,7 +7,7 @@
#pragma once
#include <AK/IntrusiveList.h>
-#include <Kernel/DoubleBuffer.h>
+#include <Kernel/Library/DoubleBuffer.h>
#include <Kernel/Net/Socket.h>
namespace Kernel {
diff --git a/Kernel/Net/NetworkAdapter.cpp b/Kernel/Net/NetworkAdapter.cpp
index b6bb729980..b8d078087c 100644
--- a/Kernel/Net/NetworkAdapter.cpp
+++ b/Kernel/Net/NetworkAdapter.cpp
@@ -6,10 +6,10 @@
#include <Kernel/Heap/kmalloc.h>
#include <Kernel/InterruptDisabler.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Net/EtherType.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Net/NetworkingManagement.h>
-#include <Kernel/StdLib.h>
#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Net/NetworkAdapter.h b/Kernel/Net/NetworkAdapter.h
index caec4a3be0..27bb1eece4 100644
--- a/Kernel/Net/NetworkAdapter.h
+++ b/Kernel/Net/NetworkAdapter.h
@@ -13,14 +13,14 @@
#include <AK/MACAddress.h>
#include <AK/Types.h>
#include <Kernel/Bus/PCI/Definitions.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
#include <Kernel/Library/LockWeakPtr.h>
#include <Kernel/Library/LockWeakable.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Net/ARP.h>
#include <Kernel/Net/EthernetFrameHeader.h>
#include <Kernel/Net/ICMP.h>
#include <Kernel/Net/IPv4.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/Net/NetworkingManagement.cpp b/Kernel/Net/NetworkingManagement.cpp
index 111696cbbd..1a64711889 100644
--- a/Kernel/Net/NetworkingManagement.cpp
+++ b/Kernel/Net/NetworkingManagement.cpp
@@ -7,7 +7,7 @@
#include <AK/Singleton.h>
#include <Kernel/Bus/PCI/API.h>
#include <Kernel/CommandLine.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Multiboot.h>
#include <Kernel/Net/Intel/E1000ENetworkAdapter.h>
diff --git a/Kernel/Net/Realtek/RTL8168NetworkAdapter.h b/Kernel/Net/Realtek/RTL8168NetworkAdapter.h
index c8a0bfb131..8b25fbfbd5 100644
--- a/Kernel/Net/Realtek/RTL8168NetworkAdapter.h
+++ b/Kernel/Net/Realtek/RTL8168NetworkAdapter.h
@@ -9,8 +9,8 @@
#include <AK/OwnPtr.h>
#include <Kernel/Bus/PCI/Access.h>
#include <Kernel/Bus/PCI/Device.h>
-#include <Kernel/IOWindow.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Library/IOWindow.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Security/Random.h>
diff --git a/Kernel/PerformanceEventBuffer.cpp b/Kernel/PerformanceEventBuffer.cpp
index ed59bf6ba9..929e569f0d 100644
--- a/Kernel/PerformanceEventBuffer.cpp
+++ b/Kernel/PerformanceEventBuffer.cpp
@@ -11,7 +11,7 @@
#include <Kernel/Arch/SafeMem.h>
#include <Kernel/Arch/SmapDisabler.h>
#include <Kernel/FileSystem/Custody.h>
-#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Library/KBufferBuilder.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
diff --git a/Kernel/PerformanceEventBuffer.h b/Kernel/PerformanceEventBuffer.h
index 07cf54983d..74233424be 100644
--- a/Kernel/PerformanceEventBuffer.h
+++ b/Kernel/PerformanceEventBuffer.h
@@ -7,7 +7,7 @@
#pragma once
#include <AK/Error.h>
-#include <Kernel/KBuffer.h>
+#include <Kernel/Library/KBuffer.h>
namespace Kernel {
diff --git a/Kernel/Prekernel/CMakeLists.txt b/Kernel/Prekernel/CMakeLists.txt
index f554ce4820..a5d4cbc6b0 100644
--- a/Kernel/Prekernel/CMakeLists.txt
+++ b/Kernel/Prekernel/CMakeLists.txt
@@ -1,6 +1,6 @@
set(SOURCES
UBSanitizer.cpp
- ../MiniStdLib.cpp
+ ../Library/MiniStdLib.cpp
boot.S
multiboot.S
init.cpp
diff --git a/Kernel/Security/Jail.h b/Kernel/Security/Jail.h
index 54d98c4014..d5c6734120 100644
--- a/Kernel/Security/Jail.h
+++ b/Kernel/Security/Jail.h
@@ -15,7 +15,7 @@
#include <AK/RefPtr.h>
#include <AK/Try.h>
#include <AK/Types.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
#include <Kernel/Locking/SpinlockProtected.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/Security/Random.h b/Kernel/Security/Random.h
index 2ae6bd91f1..97d7b2eab6 100644
--- a/Kernel/Security/Random.h
+++ b/Kernel/Security/Random.h
@@ -11,8 +11,8 @@
#include <AK/ByteBuffer.h>
#include <AK/Types.h>
#include <Kernel/Arch/Processor.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Locking/Mutex.h>
-#include <Kernel/StdLib.h>
#include <LibCrypto/Cipher/AES.h>
#include <LibCrypto/Cipher/Cipher.h>
#include <LibCrypto/Hash/SHA2.h>
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp
index b287287619..a3282e9bb7 100644
--- a/Kernel/Syscall.cpp
+++ b/Kernel/Syscall.cpp
@@ -8,8 +8,8 @@
#include <Kernel/API/Syscall.h>
#include <Kernel/Arch/RegisterState.h>
#include <Kernel/Arch/TrapFrame.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Sections.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/Syscalls/debug.cpp b/Kernel/Syscalls/debug.cpp
index c18dcf3575..5da74a8329 100644
--- a/Kernel/Syscalls/debug.cpp
+++ b/Kernel/Syscalls/debug.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/KSyms.h>
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Tasks/Process.h>
-#include <Kernel/UserOrKernelBuffer.h>
#include <Kernel/kstdio.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp
index 737a8ddddf..ebce643278 100644
--- a/Kernel/Syscalls/execve.cpp
+++ b/Kernel/Syscalls/execve.cpp
@@ -12,10 +12,10 @@
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/Region.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
-#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/Syscalls/getrandom.cpp b/Kernel/Syscalls/getrandom.cpp
index cdbe94f4f6..e249791d8d 100644
--- a/Kernel/Syscalls/getrandom.cpp
+++ b/Kernel/Syscalls/getrandom.cpp
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Security/Random.h>
#include <Kernel/Tasks/Process.h>
-#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/jail.cpp b/Kernel/Syscalls/jail.cpp
index e58f065e9c..7ed1c167ec 100644
--- a/Kernel/Syscalls/jail.cpp
+++ b/Kernel/Syscalls/jail.cpp
@@ -6,8 +6,8 @@
#include <AK/Userspace.h>
#include <Kernel/API/Jail.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Security/Jail.h>
-#include <Kernel/StdLib.h>
#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/open.cpp b/Kernel/Syscalls/open.cpp
index cd45442461..b1386e6d95 100644
--- a/Kernel/Syscalls/open.cpp
+++ b/Kernel/Syscalls/open.cpp
@@ -8,7 +8,7 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/KLexicalPath.h>
+#include <Kernel/Library/KLexicalPath.h>
#include <Kernel/Net/LocalSocket.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/Syscalls/unveil.cpp b/Kernel/Syscalls/unveil.cpp
index 360d7d3c2f..dc9332b84c 100644
--- a/Kernel/Syscalls/unveil.cpp
+++ b/Kernel/Syscalls/unveil.cpp
@@ -10,7 +10,7 @@
#include <Kernel/API/Unveil.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/KLexicalPath.h>
+#include <Kernel/Library/KLexicalPath.h>
#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/utimensat.cpp b/Kernel/Syscalls/utimensat.cpp
index 643eeaba64..0855b5ee38 100644
--- a/Kernel/Syscalls/utimensat.cpp
+++ b/Kernel/Syscalls/utimensat.cpp
@@ -7,7 +7,7 @@
#include <AK/Assertions.h>
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/KLexicalPath.h>
+#include <Kernel/Library/KLexicalPath.h>
#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/TTY/ConsoleManagement.cpp b/Kernel/TTY/ConsoleManagement.cpp
index 87cd8c431a..69c4e94cc3 100644
--- a/Kernel/TTY/ConsoleManagement.cpp
+++ b/Kernel/TTY/ConsoleManagement.cpp
@@ -9,7 +9,7 @@
#include <Kernel/Debug.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Graphics/GraphicsManagement.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Sections.h>
#include <Kernel/TTY/ConsoleManagement.h>
diff --git a/Kernel/TTY/MasterPTY.h b/Kernel/TTY/MasterPTY.h
index 31653c9a5b..7c45f1642c 100644
--- a/Kernel/TTY/MasterPTY.h
+++ b/Kernel/TTY/MasterPTY.h
@@ -8,7 +8,7 @@
#include <AK/Badge.h>
#include <Kernel/Devices/CharacterDevice.h>
-#include <Kernel/DoubleBuffer.h>
+#include <Kernel/Library/DoubleBuffer.h>
namespace Kernel {
diff --git a/Kernel/TTY/TTY.h b/Kernel/TTY/TTY.h
index 19c9fc0c2b..67343462dc 100644
--- a/Kernel/TTY/TTY.h
+++ b/Kernel/TTY/TTY.h
@@ -8,7 +8,7 @@
#include <AK/CircularDeque.h>
#include <Kernel/Devices/CharacterDevice.h>
-#include <Kernel/DoubleBuffer.h>
+#include <Kernel/Library/DoubleBuffer.h>
#include <Kernel/Library/LockWeakPtr.h>
#include <Kernel/Tasks/ProcessGroup.h>
#include <Kernel/UnixTypes.h>
diff --git a/Kernel/TTY/VirtualConsole.cpp b/Kernel/TTY/VirtualConsole.cpp
index 5cd2c767bf..e84a2fd0db 100644
--- a/Kernel/TTY/VirtualConsole.cpp
+++ b/Kernel/TTY/VirtualConsole.cpp
@@ -16,8 +16,8 @@
#include <Kernel/Devices/HID/Management.h>
#include <Kernel/Graphics/GraphicsManagement.h>
#include <Kernel/Heap/kmalloc.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Sections.h>
-#include <Kernel/StdLib.h>
#include <Kernel/TTY/ConsoleManagement.h>
#include <Kernel/TTY/VirtualConsole.h>
#include <LibVT/Color.h>
diff --git a/Kernel/Tasks/Coredump.cpp b/Kernel/Tasks/Coredump.cpp
index 4a55aae3cd..52a1287e09 100644
--- a/Kernel/Tasks/Coredump.cpp
+++ b/Kernel/Tasks/Coredump.cpp
@@ -13,8 +13,8 @@
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/KBufferBuilder.h>
-#include <Kernel/KLexicalPath.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/KLexicalPath.h>
#include <Kernel/Locking/Spinlock.h>
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>
#include <Kernel/Tasks/Coredump.h>
diff --git a/Kernel/Tasks/CrashHandler.cpp b/Kernel/Tasks/CrashHandler.cpp
index 3715bbe236..1e00864b70 100644
--- a/Kernel/Tasks/CrashHandler.cpp
+++ b/Kernel/Tasks/CrashHandler.cpp
@@ -7,7 +7,7 @@
#include <Kernel/Arch/CPU.h>
#include <Kernel/Arch/RegisterState.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Thread.h>
diff --git a/Kernel/Tasks/Process.cpp b/Kernel/Tasks/Process.cpp
index c95c022ff7..bcfef1d571 100644
--- a/Kernel/Tasks/Process.cpp
+++ b/Kernel/Tasks/Process.cpp
@@ -25,15 +25,15 @@
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/KBufferBuilder.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Library/KBufferBuilder.h>
+#include <Kernel/Library/Panic.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
-#include <Kernel/Panic.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Sections.h>
-#include <Kernel/StdLib.h>
#include <Kernel/TTY/TTY.h>
#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/Scheduler.h>
diff --git a/Kernel/Tasks/Process.h b/Kernel/Tasks/Process.h
index 08e9a67c29..b94ff7d381 100644
--- a/Kernel/Tasks/Process.h
+++ b/Kernel/Tasks/Process.h
@@ -17,20 +17,20 @@
#include <Kernel/API/POSIX/select.h>
#include <Kernel/API/POSIX/sys/resource.h>
#include <Kernel/API/Syscall.h>
-#include <Kernel/Assertions.h>
#include <Kernel/FileSystem/InodeMetadata.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/UnveilNode.h>
#include <Kernel/Forward.h>
+#include <Kernel/Library/Assertions.h>
#include <Kernel/Library/LockWeakPtr.h>
#include <Kernel/Library/LockWeakable.h>
+#include <Kernel/Library/StdLib.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Locking/MutexProtected.h>
#include <Kernel/Memory/AddressSpace.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/Security/Credentials.h>
#include <Kernel/Security/Jail.h>
-#include <Kernel/StdLib.h>
#include <Kernel/Tasks/AtomicEdgeAction.h>
#include <Kernel/Tasks/FutexQueue.h>
#include <Kernel/Tasks/ProcessGroup.h>
diff --git a/Kernel/Tasks/Scheduler.cpp b/Kernel/Tasks/Scheduler.cpp
index f1d271a880..8e2632c7c2 100644
--- a/Kernel/Tasks/Scheduler.cpp
+++ b/Kernel/Tasks/Scheduler.cpp
@@ -11,7 +11,7 @@
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Debug.h>
#include <Kernel/InterruptDisabler.h>
-#include <Kernel/Panic.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Sections.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/Tasks/Thread.cpp b/Kernel/Tasks/Thread.cpp
index 1b9d9d12d8..d42a4df45c 100644
--- a/Kernel/Tasks/Thread.cpp
+++ b/Kernel/Tasks/Thread.cpp
@@ -18,9 +18,9 @@
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/InterruptDisabler.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Library/Panic.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>
-#include <Kernel/Panic.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/Sections.h>
#include <Kernel/Tasks/Process.h>
diff --git a/Kernel/Tasks/Thread.h b/Kernel/Tasks/Thread.h
index a13259e5e6..412fb069f7 100644
--- a/Kernel/Tasks/Thread.h
+++ b/Kernel/Tasks/Thread.h
@@ -22,7 +22,7 @@
#include <Kernel/Arch/ThreadRegisters.h>
#include <Kernel/Debug.h>
#include <Kernel/Forward.h>
-#include <Kernel/KString.h>
+#include <Kernel/Library/KString.h>
#include <Kernel/Library/ListedRefCounted.h>
#include <Kernel/Library/LockWeakPtr.h>
#include <Kernel/Library/LockWeakable.h>
diff --git a/Userland/Libraries/LibEDID/EDID.cpp b/Userland/Libraries/LibEDID/EDID.cpp
index 91501bcde1..c75bfbd92d 100644
--- a/Userland/Libraries/LibEDID/EDID.cpp
+++ b/Userland/Libraries/LibEDID/EDID.cpp
@@ -11,7 +11,7 @@
#include <LibEDID/EDID.h>
#ifdef KERNEL
-# include <Kernel/StdLib.h>
+# include <Kernel/Library/StdLib.h>
#else
# include <AK/ScopeGuard.h>
# include <Kernel/API/Graphics.h>
diff --git a/Userland/Libraries/LibEDID/EDID.h b/Userland/Libraries/LibEDID/EDID.h
index e09802eaf4..f5479253cd 100644
--- a/Userland/Libraries/LibEDID/EDID.h
+++ b/Userland/Libraries/LibEDID/EDID.h
@@ -20,7 +20,7 @@
#include <LibEDID/VIC.h>
#ifdef KERNEL
-# include <Kernel/KString.h>
+# include <Kernel/Library/KString.h>
#else
# include <AK/DeprecatedString.h>
#endif
diff --git a/Userland/Libraries/LibELF/Image.cpp b/Userland/Libraries/LibELF/Image.cpp
index 895c768923..cf4c382c28 100644
--- a/Userland/Libraries/LibELF/Image.cpp
+++ b/Userland/Libraries/LibELF/Image.cpp
@@ -16,7 +16,7 @@
#include <LibELF/Validation.h>
#ifdef KERNEL
-# include <Kernel/StdLib.h>
+# include <Kernel/Library/StdLib.h>
#else
# include <string.h>
#endif