summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2023-02-24 19:45:37 +0200
committerJelle Raaijmakers <jelle@gmta.nl>2023-06-04 21:32:34 +0200
commit1b04726c854f59fbd12d1a0eeef0b21d7aa6b832 (patch)
tree99d165c41af9c1d94e8372196e9e6516c6101288
parent788022d5d16147b7d149294f9783cb2b0022021f (diff)
downloadserenity-1b04726c854f59fbd12d1a0eeef0b21d7aa6b832.zip
Kernel: Move all tasks-related code to the Tasks subdirectory
-rw-r--r--AK/Format.cpp4
-rw-r--r--Kernel/Arch/PageFault.cpp2
-rw-r--r--Kernel/Arch/aarch64/Dummy.cpp2
-rw-r--r--Kernel/Arch/aarch64/PageDirectory.cpp4
-rw-r--r--Kernel/Arch/aarch64/Processor.cpp6
-rw-r--r--Kernel/Arch/init.cpp6
-rw-r--r--Kernel/Arch/x86_64/CPU.cpp2
-rw-r--r--Kernel/Arch/x86_64/ISABus/HID/PS2KeyboardDevice.cpp3
-rw-r--r--Kernel/Arch/x86_64/Interrupts.cpp8
-rw-r--r--Kernel/Arch/x86_64/Interrupts/APIC.cpp4
-rw-r--r--Kernel/Arch/x86_64/PageDirectory.cpp4
-rw-r--r--Kernel/Arch/x86_64/Processor.cpp6
-rw-r--r--Kernel/Arch/x86_64/SyscallEntry.cpp8
-rw-r--r--Kernel/Arch/x86_64/Time/PIT.cpp4
-rw-r--r--Kernel/Bus/USB/UHCI/UHCIController.cpp2
-rw-r--r--Kernel/Bus/USB/UHCI/UHCIController.h2
-rw-r--r--Kernel/Bus/VirtIO/Console.cpp2
-rw-r--r--Kernel/CMakeLists.txt20
-rw-r--r--Kernel/Coredump.cpp2
-rw-r--r--Kernel/CrashHandler.cpp4
-rw-r--r--Kernel/Devices/AsyncDeviceRequest.h6
-rw-r--r--Kernel/Devices/Audio/Channel.h2
-rw-r--r--Kernel/Devices/HID/KeyboardDevice.cpp4
-rw-r--r--Kernel/Devices/Storage/ATA/AHCI/InterruptHandler.h2
-rw-r--r--Kernel/Devices/Storage/ATA/AHCI/Port.cpp2
-rw-r--r--Kernel/Devices/Storage/ATA/AHCI/Port.h2
-rw-r--r--Kernel/Devices/Storage/ATA/ATAPort.cpp2
-rw-r--r--Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp4
-rw-r--r--Kernel/Devices/Storage/ATA/GenericIDE/Channel.h2
-rw-r--r--Kernel/Devices/Storage/NVMe/NVMeInterruptQueue.cpp2
-rw-r--r--Kernel/Devices/Storage/StorageController.h2
-rw-r--r--Kernel/DoubleBuffer.h2
-rw-r--r--Kernel/FileSystem/AnonymousFile.cpp2
-rw-r--r--Kernel/FileSystem/BlockBasedFileSystem.cpp2
-rw-r--r--Kernel/FileSystem/Ext2FS/FileSystem.cpp2
-rw-r--r--Kernel/FileSystem/FIFO.cpp4
-rw-r--r--Kernel/FileSystem/FIFO.h2
-rw-r--r--Kernel/FileSystem/File.cpp2
-rw-r--r--Kernel/FileSystem/Inode.cpp2
-rw-r--r--Kernel/FileSystem/InodeFile.cpp2
-rw-r--r--Kernel/FileSystem/InodeMetadata.cpp2
-rw-r--r--Kernel/FileSystem/InodeWatcher.cpp2
-rw-r--r--Kernel/FileSystem/OpenFileDescription.cpp2
-rw-r--r--Kernel/FileSystem/Plan9FS/FileSystem.cpp2
-rw-r--r--Kernel/FileSystem/Plan9FS/Inode.cpp2
-rw-r--r--Kernel/FileSystem/ProcFS/Inode.cpp2
-rw-r--r--Kernel/FileSystem/ProcFS/ProcessExposed.cpp2
-rw-r--r--Kernel/FileSystem/RAMFS/Inode.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.cpp4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.cpp2
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.cpp2
-rw-r--r--Kernel/FileSystem/VirtualFileSystem.cpp2
-rw-r--r--Kernel/Graphics/VMWare/Console.cpp2
-rw-r--r--Kernel/Graphics/VirtIOGPU/Console.cpp2
-rw-r--r--Kernel/KSyms.cpp4
-rw-r--r--Kernel/Locking/LockRank.cpp2
-rw-r--r--Kernel/Locking/Mutex.cpp2
-rw-r--r--Kernel/Locking/Mutex.h2
-rw-r--r--Kernel/Memory/AddressSpace.cpp4
-rw-r--r--Kernel/Memory/AnonymousVMObject.cpp2
-rw-r--r--Kernel/Memory/MemoryManager.cpp2
-rw-r--r--Kernel/Memory/Region.cpp6
-rw-r--r--Kernel/Net/IPv4Socket.cpp2
-rw-r--r--Kernel/Net/LocalSocket.cpp2
-rw-r--r--Kernel/Net/NetworkAdapter.cpp2
-rw-r--r--Kernel/Net/NetworkTask.cpp2
-rw-r--r--Kernel/Net/Routing.cpp2
-rw-r--r--Kernel/Net/Routing.h2
-rw-r--r--Kernel/Net/Socket.cpp2
-rw-r--r--Kernel/Net/TCPSocket.cpp2
-rw-r--r--Kernel/Net/UDPSocket.cpp2
-rw-r--r--Kernel/Panic.cpp2
-rw-r--r--Kernel/PerformanceEventBuffer.cpp2
-rw-r--r--Kernel/PerformanceManager.h4
-rw-r--r--Kernel/SanCov.cpp2
-rw-r--r--Kernel/Security/Jail.cpp2
-rw-r--r--Kernel/Security/Jail.h2
-rw-r--r--Kernel/Syscall.cpp6
-rw-r--r--Kernel/Syscalls/alarm.cpp2
-rw-r--r--Kernel/Syscalls/anon_create.cpp2
-rw-r--r--Kernel/Syscalls/beep.cpp2
-rw-r--r--Kernel/Syscalls/chdir.cpp2
-rw-r--r--Kernel/Syscalls/chmod.cpp2
-rw-r--r--Kernel/Syscalls/chown.cpp2
-rw-r--r--Kernel/Syscalls/clock.cpp2
-rw-r--r--Kernel/Syscalls/debug.cpp2
-rw-r--r--Kernel/Syscalls/disown.cpp2
-rw-r--r--Kernel/Syscalls/dup2.cpp2
-rw-r--r--Kernel/Syscalls/emuctl.cpp2
-rw-r--r--Kernel/Syscalls/execve.cpp4
-rw-r--r--Kernel/Syscalls/exit.cpp4
-rw-r--r--Kernel/Syscalls/faccessat.cpp2
-rw-r--r--Kernel/Syscalls/fallocate.cpp2
-rw-r--r--Kernel/Syscalls/fcntl.cpp2
-rw-r--r--Kernel/Syscalls/fork.cpp4
-rw-r--r--Kernel/Syscalls/fsync.cpp2
-rw-r--r--Kernel/Syscalls/ftruncate.cpp2
-rw-r--r--Kernel/Syscalls/futex.cpp2
-rw-r--r--Kernel/Syscalls/get_dir_entries.cpp2
-rw-r--r--Kernel/Syscalls/get_stack_bounds.cpp2
-rw-r--r--Kernel/Syscalls/getrandom.cpp2
-rw-r--r--Kernel/Syscalls/getuid.cpp2
-rw-r--r--Kernel/Syscalls/hostname.cpp2
-rw-r--r--Kernel/Syscalls/inode_watcher.cpp2
-rw-r--r--Kernel/Syscalls/ioctl.cpp2
-rw-r--r--Kernel/Syscalls/jail.cpp2
-rw-r--r--Kernel/Syscalls/keymap.cpp2
-rw-r--r--Kernel/Syscalls/kill.cpp2
-rw-r--r--Kernel/Syscalls/link.cpp2
-rw-r--r--Kernel/Syscalls/lseek.cpp2
-rw-r--r--Kernel/Syscalls/mkdir.cpp2
-rw-r--r--Kernel/Syscalls/mknod.cpp2
-rw-r--r--Kernel/Syscalls/mmap.cpp2
-rw-r--r--Kernel/Syscalls/mount.cpp2
-rw-r--r--Kernel/Syscalls/open.cpp2
-rw-r--r--Kernel/Syscalls/perf_event.cpp2
-rw-r--r--Kernel/Syscalls/pipe.cpp2
-rw-r--r--Kernel/Syscalls/pledge.cpp2
-rw-r--r--Kernel/Syscalls/poll.cpp2
-rw-r--r--Kernel/Syscalls/prctl.cpp2
-rw-r--r--Kernel/Syscalls/process.cpp2
-rw-r--r--Kernel/Syscalls/profiling.cpp4
-rw-r--r--Kernel/Syscalls/ptrace.cpp6
-rw-r--r--Kernel/Syscalls/purge.cpp2
-rw-r--r--Kernel/Syscalls/read.cpp2
-rw-r--r--Kernel/Syscalls/readlink.cpp2
-rw-r--r--Kernel/Syscalls/realpath.cpp2
-rw-r--r--Kernel/Syscalls/rename.cpp2
-rw-r--r--Kernel/Syscalls/resource.cpp2
-rw-r--r--Kernel/Syscalls/rmdir.cpp2
-rw-r--r--Kernel/Syscalls/sched.cpp4
-rw-r--r--Kernel/Syscalls/sendfd.cpp2
-rw-r--r--Kernel/Syscalls/setpgid.cpp2
-rw-r--r--Kernel/Syscalls/setuid.cpp2
-rw-r--r--Kernel/Syscalls/sigaction.cpp2
-rw-r--r--Kernel/Syscalls/socket.cpp2
-rw-r--r--Kernel/Syscalls/stat.cpp2
-rw-r--r--Kernel/Syscalls/statvfs.cpp2
-rw-r--r--Kernel/Syscalls/sync.cpp2
-rw-r--r--Kernel/Syscalls/sysconf.cpp2
-rw-r--r--Kernel/Syscalls/thread.cpp4
-rw-r--r--Kernel/Syscalls/times.cpp2
-rw-r--r--Kernel/Syscalls/umask.cpp2
-rw-r--r--Kernel/Syscalls/uname.cpp2
-rw-r--r--Kernel/Syscalls/unlink.cpp2
-rw-r--r--Kernel/Syscalls/unveil.cpp2
-rw-r--r--Kernel/Syscalls/utime.cpp2
-rw-r--r--Kernel/Syscalls/utimensat.cpp2
-rw-r--r--Kernel/Syscalls/waitid.cpp2
-rw-r--r--Kernel/Syscalls/write.cpp2
-rw-r--r--Kernel/TTY/MasterPTY.cpp2
-rw-r--r--Kernel/TTY/SlavePTY.cpp2
-rw-r--r--Kernel/TTY/TTY.cpp1
-rw-r--r--Kernel/TTY/TTY.h2
-rw-r--r--Kernel/Tasks/AtomicEdgeAction.h (renamed from Kernel/AtomicEdgeAction.h)0
-rw-r--r--Kernel/Tasks/FinalizerTask.cpp4
-rw-r--r--Kernel/Tasks/FutexQueue.cpp (renamed from Kernel/FutexQueue.cpp)4
-rw-r--r--Kernel/Tasks/FutexQueue.h (renamed from Kernel/FutexQueue.h)2
-rw-r--r--Kernel/Tasks/Process.cpp (renamed from Kernel/Process.cpp)8
-rw-r--r--Kernel/Tasks/Process.h (renamed from Kernel/Process.h)8
-rw-r--r--Kernel/Tasks/ProcessGroup.cpp (renamed from Kernel/ProcessGroup.cpp)2
-rw-r--r--Kernel/Tasks/ProcessGroup.h (renamed from Kernel/ProcessGroup.h)0
-rw-r--r--Kernel/Tasks/ProcessList.cpp (renamed from Kernel/ProcessList.cpp)2
-rw-r--r--Kernel/Tasks/Scheduler.cpp (renamed from Kernel/Scheduler.cpp)4
-rw-r--r--Kernel/Tasks/Scheduler.h (renamed from Kernel/Scheduler.h)0
-rw-r--r--Kernel/Tasks/SyncTask.cpp2
-rw-r--r--Kernel/Tasks/Thread.cpp (renamed from Kernel/Thread.cpp)8
-rw-r--r--Kernel/Tasks/Thread.h (renamed from Kernel/Thread.h)0
-rw-r--r--Kernel/Tasks/ThreadBlockers.cpp (renamed from Kernel/ThreadBlockers.cpp)6
-rw-r--r--Kernel/Tasks/ThreadTracer.cpp (renamed from Kernel/ThreadTracer.cpp)2
-rw-r--r--Kernel/Tasks/ThreadTracer.h (renamed from Kernel/ThreadTracer.h)0
-rw-r--r--Kernel/Tasks/WaitQueue.cpp (renamed from Kernel/WaitQueue.cpp)4
-rw-r--r--Kernel/Tasks/WaitQueue.h (renamed from Kernel/WaitQueue.h)2
-rw-r--r--Kernel/Tasks/WorkQueue.cpp (renamed from Kernel/WorkQueue.cpp)6
-rw-r--r--Kernel/Tasks/WorkQueue.h (renamed from Kernel/WorkQueue.h)2
-rw-r--r--Kernel/Time/TimeManagement.cpp2
-rw-r--r--Kernel/TimerQueue.cpp2
184 files changed, 245 insertions, 243 deletions
diff --git a/AK/Format.cpp b/AK/Format.cpp
index 12daeb6815..9835b3ef4e 100644
--- a/AK/Format.cpp
+++ b/AK/Format.cpp
@@ -16,8 +16,8 @@
#endif
#ifdef KERNEL
-# include <Kernel/Process.h>
-# include <Kernel/Thread.h>
+# include <Kernel/Tasks/Process.h>
+# include <Kernel/Tasks/Thread.h>
# include <Kernel/Time/TimeManagement.h>
#else
# include <math.h>
diff --git a/Kernel/Arch/PageFault.cpp b/Kernel/Arch/PageFault.cpp
index abc387a270..a341de455a 100644
--- a/Kernel/Arch/PageFault.cpp
+++ b/Kernel/Arch/PageFault.cpp
@@ -10,7 +10,7 @@
#include <Kernel/Arch/RegisterState.h>
#include <Kernel/Arch/SafeMem.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/Arch/aarch64/Dummy.cpp b/Kernel/Arch/aarch64/Dummy.cpp
index e08dcd713c..a8d3aec853 100644
--- a/Kernel/Arch/aarch64/Dummy.cpp
+++ b/Kernel/Arch/aarch64/Dummy.cpp
@@ -9,8 +9,8 @@
#include <Kernel/Arch/Delay.h>
#include <Kernel/Bus/PCI/Initializer.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/kstdio.h>
// Delay.cpp
diff --git a/Kernel/Arch/aarch64/PageDirectory.cpp b/Kernel/Arch/aarch64/PageDirectory.cpp
index 814323783e..e0b8bfde99 100644
--- a/Kernel/Arch/aarch64/PageDirectory.cpp
+++ b/Kernel/Arch/aarch64/PageDirectory.cpp
@@ -12,10 +12,10 @@
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Prekernel/Prekernel.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel::Memory {
diff --git a/Kernel/Arch/aarch64/Processor.cpp b/Kernel/Arch/aarch64/Processor.cpp
index c530e193bb..7f9e4d46a2 100644
--- a/Kernel/Arch/aarch64/Processor.cpp
+++ b/Kernel/Arch/aarch64/Processor.cpp
@@ -14,10 +14,10 @@
#include <Kernel/Arch/aarch64/CPU.h>
#include <Kernel/Arch/aarch64/CPUID.h>
#include <Kernel/InterruptDisabler.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
-#include <Kernel/Scheduler.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/Arch/init.cpp b/Kernel/Arch/init.cpp
index cf1577e293..22d09ae0b4 100644
--- a/Kernel/Arch/init.cpp
+++ b/Kernel/Arch/init.cpp
@@ -43,17 +43,17 @@
#include <Kernel/Net/NetworkingManagement.h>
#include <Kernel/Panic.h>
#include <Kernel/Prekernel/Prekernel.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
#include <Kernel/TTY/ConsoleManagement.h>
#include <Kernel/TTY/PTYMultiplexer.h>
#include <Kernel/TTY/VirtualConsole.h>
#include <Kernel/Tasks/FinalizerTask.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Tasks/SyncTask.h>
+#include <Kernel/Tasks/WorkQueue.h>
#include <Kernel/Time/TimeManagement.h>
-#include <Kernel/WorkQueue.h>
#include <Kernel/kstdio.h>
#if ARCH(X86_64)
diff --git a/Kernel/Arch/x86_64/CPU.cpp b/Kernel/Arch/x86_64/CPU.cpp
index 635613d5c6..5c735d6c4e 100644
--- a/Kernel/Arch/x86_64/CPU.cpp
+++ b/Kernel/Arch/x86_64/CPU.cpp
@@ -7,7 +7,7 @@
#include <AK/Assertions.h>
#include <Kernel/Arch/CPU.h>
#include <Kernel/Panic.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
using namespace Kernel;
diff --git a/Kernel/Arch/x86_64/ISABus/HID/PS2KeyboardDevice.cpp b/Kernel/Arch/x86_64/ISABus/HID/PS2KeyboardDevice.cpp
index 4b4ea60e7d..0bc9cbfdc4 100644
--- a/Kernel/Arch/x86_64/ISABus/HID/PS2KeyboardDevice.cpp
+++ b/Kernel/Arch/x86_64/ISABus/HID/PS2KeyboardDevice.cpp
@@ -12,6 +12,9 @@
#include <Kernel/Devices/HID/Management.h>
#include <Kernel/Devices/HID/ScanCodeEvent.h>
#include <Kernel/Sections.h>
+#include <Kernel/TTY/ConsoleManagement.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/Arch/x86_64/Interrupts.cpp b/Kernel/Arch/x86_64/Interrupts.cpp
index 15a524539d..1bff3a707d 100644
--- a/Kernel/Arch/x86_64/Interrupts.cpp
+++ b/Kernel/Arch/x86_64/Interrupts.cpp
@@ -17,12 +17,12 @@
#include <Kernel/Interrupts/UnhandledInterruptHandler.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
-#include <Kernel/Thread.h>
-#include <Kernel/ThreadTracer.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
+#include <Kernel/Tasks/ThreadTracer.h>
#include <Kernel/Arch/CPU.h>
#include <Kernel/Arch/PageFault.h>
diff --git a/Kernel/Arch/x86_64/Interrupts/APIC.cpp b/Kernel/Arch/x86_64/Interrupts/APIC.cpp
index 9fe4101c3c..c717495cb5 100644
--- a/Kernel/Arch/x86_64/Interrupts/APIC.cpp
+++ b/Kernel/Arch/x86_64/Interrupts/APIC.cpp
@@ -20,9 +20,9 @@
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Panic.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
#define IRQ_APIC_TIMER (0xfc - IRQ_VECTOR_BASE)
#define IRQ_APIC_IPI (0xfd - IRQ_VECTOR_BASE)
diff --git a/Kernel/Arch/x86_64/PageDirectory.cpp b/Kernel/Arch/x86_64/PageDirectory.cpp
index e1459dee62..ff905cfcf6 100644
--- a/Kernel/Arch/x86_64/PageDirectory.cpp
+++ b/Kernel/Arch/x86_64/PageDirectory.cpp
@@ -11,10 +11,10 @@
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Prekernel/Prekernel.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel::Memory {
diff --git a/Kernel/Arch/x86_64/Processor.cpp b/Kernel/Arch/x86_64/Processor.cpp
index 67c73eac9c..593a7816b2 100644
--- a/Kernel/Arch/x86_64/Processor.cpp
+++ b/Kernel/Arch/x86_64/Processor.cpp
@@ -14,12 +14,12 @@
#include <Kernel/Arch/x86_64/Interrupts/APIC.h>
#include <Kernel/InterruptDisabler.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
#include <Kernel/StdLib.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
#include <Kernel/Arch/Interrupts.h>
#include <Kernel/Arch/Processor.h>
diff --git a/Kernel/Arch/x86_64/SyscallEntry.cpp b/Kernel/Arch/x86_64/SyscallEntry.cpp
index 052a6941b4..45e7c339fd 100644
--- a/Kernel/Arch/x86_64/SyscallEntry.cpp
+++ b/Kernel/Arch/x86_64/SyscallEntry.cpp
@@ -10,10 +10,10 @@
#include <Kernel/Arch/x86_64/Processor.h>
#include <Kernel/Assertions.h>
#include <Kernel/Panic.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
-#include <Kernel/Thread.h>
-#include <Kernel/ThreadTracer.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
+#include <Kernel/Tasks/ThreadTracer.h>
using namespace Kernel;
diff --git a/Kernel/Arch/x86_64/Time/PIT.cpp b/Kernel/Arch/x86_64/Time/PIT.cpp
index bd1644956d..4626de8596 100644
--- a/Kernel/Arch/x86_64/Time/PIT.cpp
+++ b/Kernel/Arch/x86_64/Time/PIT.cpp
@@ -8,9 +8,9 @@
#include <Kernel/Arch/x86_64/Time/PIT.h>
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Interrupts/GenericInterruptHandler.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
#include <Kernel/Time/TimeManagement.h>
#define IRQ_TIMER 0
diff --git a/Kernel/Bus/USB/UHCI/UHCIController.cpp b/Kernel/Bus/USB/UHCI/UHCIController.cpp
index ce373e7acb..a5ec69a9b7 100644
--- a/Kernel/Bus/USB/UHCI/UHCIController.cpp
+++ b/Kernel/Bus/USB/UHCI/UHCIController.cpp
@@ -14,9 +14,9 @@
#include <Kernel/Debug.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
#include <Kernel/StdLib.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
static constexpr u8 RETRY_COUNTER_RELOAD = 3;
diff --git a/Kernel/Bus/USB/UHCI/UHCIController.h b/Kernel/Bus/USB/UHCI/UHCIController.h
index 4041da4be4..dce859bbb8 100644
--- a/Kernel/Bus/USB/UHCI/UHCIController.h
+++ b/Kernel/Bus/USB/UHCI/UHCIController.h
@@ -19,7 +19,7 @@
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Locking/Spinlock.h>
#include <Kernel/Memory/AnonymousVMObject.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel::USB {
diff --git a/Kernel/Bus/VirtIO/Console.cpp b/Kernel/Bus/VirtIO/Console.cpp
index b34b186977..ae8f984bcc 100644
--- a/Kernel/Bus/VirtIO/Console.cpp
+++ b/Kernel/Bus/VirtIO/Console.cpp
@@ -8,7 +8,7 @@
#include <Kernel/Bus/VirtIO/Console.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Sections.h>
-#include <Kernel/WorkQueue.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel::VirtIO {
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index ad49556bb5..c9c7f470b0 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -216,7 +216,6 @@ set(KERNEL_SOURCES
Firmware/ACPI/Initialize.cpp
Firmware/ACPI/Parser.cpp
Firmware/MultiProcessor/Parser.cpp
- FutexQueue.cpp
Interrupts/GenericInterruptHandler.cpp
Interrupts/IRQHandler.cpp
Interrupts/PCIIRQHandler.cpp
@@ -261,11 +260,7 @@ set(KERNEL_SOURCES
Net/UDPSocket.cpp
Panic.cpp
PerformanceEventBuffer.cpp
- Process.cpp
- ProcessGroup.cpp
- ProcessList.cpp
Random.cpp
- Scheduler.cpp
ScopedCritical.cpp
StdLib.cpp
Syscall.cpp
@@ -349,16 +344,21 @@ set(KERNEL_SOURCES
TTY/TTY.cpp
TTY/VirtualConsole.cpp
Tasks/FinalizerTask.cpp
+ Tasks/FutexQueue.cpp
+ Tasks/Process.cpp
+ Tasks/ProcessGroup.cpp
+ Tasks/ProcessList.cpp
+ Tasks/Scheduler.cpp
Tasks/SyncTask.cpp
- Thread.cpp
- ThreadBlockers.cpp
- ThreadTracer.cpp
+ Tasks/Thread.cpp
+ Tasks/ThreadBlockers.cpp
+ Tasks/ThreadTracer.cpp
+ Tasks/WaitQueue.cpp
+ Tasks/WorkQueue.cpp
Time/TimeManagement.cpp
TimerQueue.cpp
UBSanitizer.cpp
UserOrKernelBuffer.cpp
- WaitQueue.cpp
- WorkQueue.cpp
)
if ("${SERENITY_ARCH}" STREQUAL "x86_64")
diff --git a/Kernel/Coredump.cpp b/Kernel/Coredump.cpp
index ce23c9ddc3..4cad41a12c 100644
--- a/Kernel/Coredump.cpp
+++ b/Kernel/Coredump.cpp
@@ -18,7 +18,7 @@
#include <Kernel/KLexicalPath.h>
#include <Kernel/Locking/Spinlock.h>
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <LibC/elf.h>
#include <LibELF/Core.h>
diff --git a/Kernel/CrashHandler.cpp b/Kernel/CrashHandler.cpp
index f0780827c7..3715bbe236 100644
--- a/Kernel/CrashHandler.cpp
+++ b/Kernel/CrashHandler.cpp
@@ -8,8 +8,8 @@
#include <Kernel/Arch/RegisterState.h>
#include <Kernel/Panic.h>
-#include <Kernel/Process.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/Devices/AsyncDeviceRequest.h b/Kernel/Devices/AsyncDeviceRequest.h
index 8e9d57610c..a2f1a9b5ce 100644
--- a/Kernel/Devices/AsyncDeviceRequest.h
+++ b/Kernel/Devices/AsyncDeviceRequest.h
@@ -9,10 +9,10 @@
#include <AK/IntrusiveList.h>
#include <Kernel/Library/NonnullLockRefPtr.h>
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>
-#include <Kernel/Process.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Thread.h>
+#include <Kernel/Tasks/WaitQueue.h>
#include <Kernel/UserOrKernelBuffer.h>
-#include <Kernel/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/Audio/Channel.h b/Kernel/Devices/Audio/Channel.h
index 188264a8de..d04826d78b 100644
--- a/Kernel/Devices/Audio/Channel.h
+++ b/Kernel/Devices/Audio/Channel.h
@@ -10,7 +10,7 @@
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/WaitQueue.h>
+#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/HID/KeyboardDevice.cpp b/Kernel/Devices/HID/KeyboardDevice.cpp
index 7daf6335b3..5b5aa668c3 100644
--- a/Kernel/Devices/HID/KeyboardDevice.cpp
+++ b/Kernel/Devices/HID/KeyboardDevice.cpp
@@ -12,11 +12,11 @@
#include <Kernel/API/KeyCode.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Devices/HID/KeyboardDevice.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
#include <Kernel/TTY/ConsoleManagement.h>
#include <Kernel/TTY/VirtualConsole.h>
-#include <Kernel/WorkQueue.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/Storage/ATA/AHCI/InterruptHandler.h b/Kernel/Devices/Storage/ATA/AHCI/InterruptHandler.h
index 56b25f6633..0c2e16d6ba 100644
--- a/Kernel/Devices/Storage/ATA/AHCI/InterruptHandler.h
+++ b/Kernel/Devices/Storage/ATA/AHCI/InterruptHandler.h
@@ -17,7 +17,7 @@
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
-#include <Kernel/WaitQueue.h>
+#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/Storage/ATA/AHCI/Port.cpp b/Kernel/Devices/Storage/ATA/AHCI/Port.cpp
index 9055151cf3..10e4120f5a 100644
--- a/Kernel/Devices/Storage/ATA/AHCI/Port.cpp
+++ b/Kernel/Devices/Storage/ATA/AHCI/Port.cpp
@@ -17,7 +17,7 @@
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/ScatterGatherList.h>
#include <Kernel/Memory/TypedMapping.h>
-#include <Kernel/WorkQueue.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/Storage/ATA/AHCI/Port.h b/Kernel/Devices/Storage/ATA/AHCI/Port.h
index 84a3684f43..cbabd3b9c5 100644
--- a/Kernel/Devices/Storage/ATA/AHCI/Port.h
+++ b/Kernel/Devices/Storage/ATA/AHCI/Port.h
@@ -24,7 +24,7 @@
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
-#include <Kernel/WaitQueue.h>
+#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/Storage/ATA/ATAPort.cpp b/Kernel/Devices/Storage/ATA/ATAPort.cpp
index e4fac44a0d..7c8ca01d3a 100644
--- a/Kernel/Devices/Storage/ATA/ATAPort.cpp
+++ b/Kernel/Devices/Storage/ATA/ATAPort.cpp
@@ -9,7 +9,7 @@
#include <Kernel/Devices/Storage/ATA/ATADiskDevice.h>
#include <Kernel/Devices/Storage/ATA/ATAPort.h>
#include <Kernel/Devices/Storage/ATA/Definitions.h>
-#include <Kernel/WorkQueue.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp
index cec52e8fd0..261665c379 100644
--- a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp
+++ b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.cpp
@@ -15,9 +15,9 @@
#include <Kernel/Devices/Storage/ATA/GenericIDE/Controller.h>
#include <Kernel/IOWindow.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
-#include <Kernel/WorkQueue.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h
index 57dfba3bfb..f7a097d6b6 100644
--- a/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h
+++ b/Kernel/Devices/Storage/ATA/GenericIDE/Channel.h
@@ -29,7 +29,7 @@
#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
-#include <Kernel/WaitQueue.h>
+#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/Storage/NVMe/NVMeInterruptQueue.cpp b/Kernel/Devices/Storage/NVMe/NVMeInterruptQueue.cpp
index 9b8c177773..43780166a6 100644
--- a/Kernel/Devices/Storage/NVMe/NVMeInterruptQueue.cpp
+++ b/Kernel/Devices/Storage/NVMe/NVMeInterruptQueue.cpp
@@ -7,7 +7,7 @@
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/Devices/Storage/NVMe/NVMeDefinitions.h>
#include <Kernel/Devices/Storage/NVMe/NVMeInterruptQueue.h>
-#include <Kernel/WorkQueue.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/Storage/StorageController.h b/Kernel/Devices/Storage/StorageController.h
index 70b7426cab..13923bc60c 100644
--- a/Kernel/Devices/Storage/StorageController.h
+++ b/Kernel/Devices/Storage/StorageController.h
@@ -15,7 +15,7 @@
#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
-#include <Kernel/WaitQueue.h>
+#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/DoubleBuffer.h b/Kernel/DoubleBuffer.h
index 54bb39bd8c..ce4c9f1595 100644
--- a/Kernel/DoubleBuffer.h
+++ b/Kernel/DoubleBuffer.h
@@ -9,7 +9,7 @@
#include <AK/Types.h>
#include <Kernel/KBuffer.h>
#include <Kernel/Locking/Mutex.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/AnonymousFile.cpp b/Kernel/FileSystem/AnonymousFile.cpp
index 0e7a738f16..573b22b365 100644
--- a/Kernel/FileSystem/AnonymousFile.cpp
+++ b/Kernel/FileSystem/AnonymousFile.cpp
@@ -6,7 +6,7 @@
#include <Kernel/FileSystem/AnonymousFile.h>
#include <Kernel/Memory/AnonymousVMObject.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/BlockBasedFileSystem.cpp b/Kernel/FileSystem/BlockBasedFileSystem.cpp
index 852fb524f5..6143f3472e 100644
--- a/Kernel/FileSystem/BlockBasedFileSystem.cpp
+++ b/Kernel/FileSystem/BlockBasedFileSystem.cpp
@@ -7,7 +7,7 @@
#include <AK/IntrusiveList.h>
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/BlockBasedFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Ext2FS/FileSystem.cpp b/Kernel/FileSystem/Ext2FS/FileSystem.cpp
index d5e1160f39..388f44d2bc 100644
--- a/Kernel/FileSystem/Ext2FS/FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FS/FileSystem.cpp
@@ -8,7 +8,7 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Ext2FS/FileSystem.h>
#include <Kernel/FileSystem/Ext2FS/Inode.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/UnixTypes.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/FIFO.cpp b/Kernel/FileSystem/FIFO.cpp
index 1c7939db11..bcd1d4236e 100644
--- a/Kernel/FileSystem/FIFO.cpp
+++ b/Kernel/FileSystem/FIFO.cpp
@@ -9,8 +9,8 @@
#include <Kernel/FileSystem/FIFO.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/Locking/Mutex.h>
-#include <Kernel/Process.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/FIFO.h b/Kernel/FileSystem/FIFO.h
index bfb19bacbe..14a677d392 100644
--- a/Kernel/FileSystem/FIFO.h
+++ b/Kernel/FileSystem/FIFO.h
@@ -9,8 +9,8 @@
#include <Kernel/DoubleBuffer.h>
#include <Kernel/FileSystem/File.h>
#include <Kernel/Locking/Mutex.h>
+#include <Kernel/Tasks/WaitQueue.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/File.cpp b/Kernel/FileSystem/File.cpp
index ebc8b43c78..e8efaefd11 100644
--- a/Kernel/FileSystem/File.cpp
+++ b/Kernel/FileSystem/File.cpp
@@ -8,7 +8,7 @@
#include <AK/Userspace.h>
#include <Kernel/FileSystem/File.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp
index ddfd99e2a2..221ebee6d1 100644
--- a/Kernel/FileSystem/Inode.cpp
+++ b/Kernel/FileSystem/Inode.cpp
@@ -17,7 +17,7 @@
#include <Kernel/KBufferBuilder.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Net/LocalSocket.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/InodeFile.cpp b/Kernel/FileSystem/InodeFile.cpp
index 745079331c..1a3b1c56b2 100644
--- a/Kernel/FileSystem/InodeFile.cpp
+++ b/Kernel/FileSystem/InodeFile.cpp
@@ -13,7 +13,7 @@
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/Memory/PrivateInodeVMObject.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/InodeMetadata.cpp b/Kernel/FileSystem/InodeMetadata.cpp
index 5ac40e7eba..6cbfb157fe 100644
--- a/Kernel/FileSystem/InodeMetadata.cpp
+++ b/Kernel/FileSystem/InodeMetadata.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/InodeMetadata.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/InodeWatcher.cpp b/Kernel/FileSystem/InodeWatcher.cpp
index 4daf649633..4929c2abee 100644
--- a/Kernel/FileSystem/InodeWatcher.cpp
+++ b/Kernel/FileSystem/InodeWatcher.cpp
@@ -7,7 +7,7 @@
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/FileSystem/InodeWatcher.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/OpenFileDescription.cpp b/Kernel/FileSystem/OpenFileDescription.cpp
index 59521aa192..f69cfeb7bc 100644
--- a/Kernel/FileSystem/OpenFileDescription.cpp
+++ b/Kernel/FileSystem/OpenFileDescription.cpp
@@ -16,9 +16,9 @@
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Net/Socket.h>
-#include <Kernel/Process.h>
#include <Kernel/TTY/MasterPTY.h>
#include <Kernel/TTY/TTY.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/UnixTypes.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Plan9FS/FileSystem.cpp b/Kernel/FileSystem/Plan9FS/FileSystem.cpp
index 6c6f038cd9..feadf6d864 100644
--- a/Kernel/FileSystem/Plan9FS/FileSystem.cpp
+++ b/Kernel/FileSystem/Plan9FS/FileSystem.cpp
@@ -6,7 +6,7 @@
#include <Kernel/FileSystem/Plan9FS/FileSystem.h>
#include <Kernel/FileSystem/Plan9FS/Inode.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Plan9FS/Inode.cpp b/Kernel/FileSystem/Plan9FS/Inode.cpp
index 431661abc6..aea2e628c1 100644
--- a/Kernel/FileSystem/Plan9FS/Inode.cpp
+++ b/Kernel/FileSystem/Plan9FS/Inode.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/Plan9FS/Inode.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ProcFS/Inode.cpp b/Kernel/FileSystem/ProcFS/Inode.cpp
index f7845a26eb..6d77e87aae 100644
--- a/Kernel/FileSystem/ProcFS/Inode.cpp
+++ b/Kernel/FileSystem/ProcFS/Inode.cpp
@@ -7,7 +7,7 @@
*/
#include <Kernel/FileSystem/ProcFS/Inode.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ProcFS/ProcessExposed.cpp b/Kernel/FileSystem/ProcFS/ProcessExposed.cpp
index d13a8ce944..302d0ef927 100644
--- a/Kernel/FileSystem/ProcFS/ProcessExposed.cpp
+++ b/Kernel/FileSystem/ProcFS/ProcessExposed.cpp
@@ -13,8 +13,8 @@
#include <Kernel/KBufferBuilder.h>
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/Process.h>
#include <Kernel/TTY/TTY.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/RAMFS/Inode.cpp b/Kernel/FileSystem/RAMFS/Inode.cpp
index e36d7e2206..730901b71c 100644
--- a/Kernel/FileSystem/RAMFS/Inode.cpp
+++ b/Kernel/FileSystem/RAMFS/Inode.cpp
@@ -6,7 +6,7 @@
*/
#include <Kernel/FileSystem/RAMFS/Inode.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.cpp
index d9e6ea3e3f..ed4f257f3b 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Constants/ConstantInformation.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.cpp
index fc7234f6f5..95d9c3b430 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/GlobalInformation.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.cpp
index 9132613dbc..a7e10b38b9 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.cpp
@@ -8,8 +8,8 @@
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/TCP.h>
#include <Kernel/Net/Routing.h>
#include <Kernel/Net/TCPSocket.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.cpp
index 2dcab82ffa..d1ea513506 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.cpp
@@ -7,8 +7,8 @@
#include <AK/JsonObjectSerializer.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Network/UDP.h>
#include <Kernel/Net/UDPSocket.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.cpp
index 5b5b6c81db..639b9954ec 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.cpp
@@ -15,9 +15,9 @@
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/PowerStateSwitch.h>
#include <Kernel/Firmware/ACPI/Parser.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
#include <Kernel/TTY/ConsoleManagement.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.cpp
index eba6af4d07..1b21e1b0e1 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.cpp
@@ -7,10 +7,10 @@
#include <AK/JsonObjectSerializer.h>
#include <AK/Try.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Processes.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
#include <Kernel/TTY/TTY.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.cpp
index 3dc495e803..909ab9f105 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.cpp
@@ -6,8 +6,8 @@
#include <AK/JsonObjectSerializer.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/SystemStatistics.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.cpp
index 67f52e93ab..e876ed50f0 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.cpp
index 426dd45687..76c046f47a 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.cpp b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.cpp
index 62bf635dd5..638c54c136 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.cpp
+++ b/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/StringVariable.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp
index d4c81846f3..fc35552053 100644
--- a/Kernel/FileSystem/VirtualFileSystem.cpp
+++ b/Kernel/FileSystem/VirtualFileSystem.cpp
@@ -20,8 +20,8 @@
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/KLexicalPath.h>
#include <Kernel/KSyms.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Graphics/VMWare/Console.cpp b/Kernel/Graphics/VMWare/Console.cpp
index 033caa21a4..a061b97918 100644
--- a/Kernel/Graphics/VMWare/Console.cpp
+++ b/Kernel/Graphics/VMWare/Console.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/Graphics/VMWare/Console.h>
-#include <Kernel/WorkQueue.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/Graphics/VirtIOGPU/Console.cpp b/Kernel/Graphics/VirtIOGPU/Console.cpp
index 57a338fcdf..a7e64bb0f5 100644
--- a/Kernel/Graphics/VirtIOGPU/Console.cpp
+++ b/Kernel/Graphics/VirtIOGPU/Console.cpp
@@ -6,7 +6,7 @@
#include <Kernel/Graphics/VirtIOGPU/Console.h>
#include <Kernel/TTY/ConsoleManagement.h>
-#include <Kernel/WorkQueue.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel::Graphics::VirtIOGPU {
diff --git a/Kernel/KSyms.cpp b/Kernel/KSyms.cpp
index b3cf6fad46..3664a1be9d 100644
--- a/Kernel/KSyms.cpp
+++ b/Kernel/KSyms.cpp
@@ -9,9 +9,9 @@
#include <Kernel/Arch/SmapDisabler.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/KSyms.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
namespace Kernel {
diff --git a/Kernel/Locking/LockRank.cpp b/Kernel/Locking/LockRank.cpp
index 0bc5e8d68c..ccb12a6d5f 100644
--- a/Kernel/Locking/LockRank.cpp
+++ b/Kernel/Locking/LockRank.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/Locking/LockRank.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
// Note: These stubs can't be in LockRank.h as that would create
// a cyclic dependency in the header include graph of the Kernel.
diff --git a/Kernel/Locking/Mutex.cpp b/Kernel/Locking/Mutex.cpp
index 26af3ba195..c2836ac977 100644
--- a/Kernel/Locking/Mutex.cpp
+++ b/Kernel/Locking/Mutex.cpp
@@ -10,7 +10,7 @@
#include <Kernel/Locking/LockLocation.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Locking/Spinlock.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
extern bool g_in_early_boot;
diff --git a/Kernel/Locking/Mutex.h b/Kernel/Locking/Mutex.h
index d083fb3baa..d2352688a9 100644
--- a/Kernel/Locking/Mutex.h
+++ b/Kernel/Locking/Mutex.h
@@ -14,7 +14,7 @@
#include <Kernel/Forward.h>
#include <Kernel/Locking/LockLocation.h>
#include <Kernel/Locking/LockMode.h>
-#include <Kernel/WaitQueue.h>
+#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Memory/AddressSpace.cpp b/Kernel/Memory/AddressSpace.cpp
index 2c9e42bd30..e3eae985d5 100644
--- a/Kernel/Memory/AddressSpace.cpp
+++ b/Kernel/Memory/AddressSpace.cpp
@@ -13,9 +13,9 @@
#include <Kernel/Memory/InodeVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
-#include <Kernel/Scheduler.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
namespace Kernel::Memory {
diff --git a/Kernel/Memory/AnonymousVMObject.cpp b/Kernel/Memory/AnonymousVMObject.cpp
index 0982f6f698..a8aa1d0912 100644
--- a/Kernel/Memory/AnonymousVMObject.cpp
+++ b/Kernel/Memory/AnonymousVMObject.cpp
@@ -10,7 +10,7 @@
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Memory/PhysicalPage.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel::Memory {
diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp
index 6d484c7b62..78ac641315 100644
--- a/Kernel/Memory/MemoryManager.cpp
+++ b/Kernel/Memory/MemoryManager.cpp
@@ -22,9 +22,9 @@
#include <Kernel/Multiboot.h>
#include <Kernel/Panic.h>
#include <Kernel/Prekernel/Prekernel.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
#include <Kernel/StdLib.h>
+#include <Kernel/Tasks/Process.h>
extern u8 start_of_kernel_image[];
extern u8 end_of_kernel_image[];
diff --git a/Kernel/Memory/Region.cpp b/Kernel/Memory/Region.cpp
index ead2e212db..afae1fc4ba 100644
--- a/Kernel/Memory/Region.cpp
+++ b/Kernel/Memory/Region.cpp
@@ -15,9 +15,9 @@
#include <Kernel/Memory/Region.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Panic.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel::Memory {
diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp
index 9b50137132..019417f813 100644
--- a/Kernel/Net/IPv4Socket.cpp
+++ b/Kernel/Net/IPv4Socket.cpp
@@ -22,7 +22,7 @@
#include <Kernel/Net/TCPSocket.h>
#include <Kernel/Net/UDP.h>
#include <Kernel/Net/UDPSocket.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/UnixTypes.h>
namespace Kernel {
diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp
index 73cddd7c42..1fc63ed932 100644
--- a/Kernel/Net/LocalSocket.cpp
+++ b/Kernel/Net/LocalSocket.cpp
@@ -14,8 +14,8 @@
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Locking/MutexProtected.h>
#include <Kernel/Net/LocalSocket.h>
-#include <Kernel/Process.h>
#include <Kernel/StdLib.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/UnixTypes.h>
namespace Kernel {
diff --git a/Kernel/Net/NetworkAdapter.cpp b/Kernel/Net/NetworkAdapter.cpp
index d577cfc18a..b6bb729980 100644
--- a/Kernel/Net/NetworkAdapter.cpp
+++ b/Kernel/Net/NetworkAdapter.cpp
@@ -9,8 +9,8 @@
#include <Kernel/Net/EtherType.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Net/NetworkingManagement.h>
-#include <Kernel/Process.h>
#include <Kernel/StdLib.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp
index 39ffeef8eb..ff91e7a66f 100644
--- a/Kernel/Net/NetworkTask.cpp
+++ b/Kernel/Net/NetworkTask.cpp
@@ -21,7 +21,7 @@
#include <Kernel/Net/TCPSocket.h>
#include <Kernel/Net/UDP.h>
#include <Kernel/Net/UDPSocket.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Net/Routing.cpp b/Kernel/Net/Routing.cpp
index 9ceaa71bc5..3285880213 100644
--- a/Kernel/Net/Routing.cpp
+++ b/Kernel/Net/Routing.cpp
@@ -12,7 +12,7 @@
#include <Kernel/Net/NetworkTask.h>
#include <Kernel/Net/NetworkingManagement.h>
#include <Kernel/Net/Routing.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/Net/Routing.h b/Kernel/Net/Routing.h
index 2ad6a08d90..a142fa63d2 100644
--- a/Kernel/Net/Routing.h
+++ b/Kernel/Net/Routing.h
@@ -10,7 +10,7 @@
#include <AK/RefPtr.h>
#include <Kernel/Locking/MutexProtected.h>
#include <Kernel/Net/NetworkAdapter.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/Net/Socket.cpp b/Kernel/Net/Socket.cpp
index 61b9034fa8..d8a4e4cd8f 100644
--- a/Kernel/Net/Socket.cpp
+++ b/Kernel/Net/Socket.cpp
@@ -12,7 +12,7 @@
#include <Kernel/Net/LocalSocket.h>
#include <Kernel/Net/NetworkingManagement.h>
#include <Kernel/Net/Socket.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/UnixTypes.h>
namespace Kernel {
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp
index 2f86cb7719..ad858f4d05 100644
--- a/Kernel/Net/TCPSocket.cpp
+++ b/Kernel/Net/TCPSocket.cpp
@@ -17,8 +17,8 @@
#include <Kernel/Net/Routing.h>
#include <Kernel/Net/TCP.h>
#include <Kernel/Net/TCPSocket.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Net/UDPSocket.cpp b/Kernel/Net/UDPSocket.cpp
index 0ac9ea8a32..db562a7880 100644
--- a/Kernel/Net/UDPSocket.cpp
+++ b/Kernel/Net/UDPSocket.cpp
@@ -10,8 +10,8 @@
#include <Kernel/Net/Routing.h>
#include <Kernel/Net/UDP.h>
#include <Kernel/Net/UDPSocket.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Panic.cpp b/Kernel/Panic.cpp
index 621149cca8..0fed4872e3 100644
--- a/Kernel/Panic.cpp
+++ b/Kernel/Panic.cpp
@@ -14,7 +14,7 @@
#include <Kernel/CommandLine.h>
#include <Kernel/KSyms.h>
#include <Kernel/Panic.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/PerformanceEventBuffer.cpp b/Kernel/PerformanceEventBuffer.cpp
index 86e20616b3..ed59bf6ba9 100644
--- a/Kernel/PerformanceEventBuffer.cpp
+++ b/Kernel/PerformanceEventBuffer.cpp
@@ -13,7 +13,7 @@
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/KBufferBuilder.h>
#include <Kernel/PerformanceEventBuffer.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/PerformanceManager.h b/Kernel/PerformanceManager.h
index 4bd55fde63..bf2c1f500b 100644
--- a/Kernel/PerformanceManager.h
+++ b/Kernel/PerformanceManager.h
@@ -7,8 +7,8 @@
#pragma once
#include <Kernel/PerformanceEventBuffer.h>
-#include <Kernel/Process.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Thread.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/SanCov.cpp b/Kernel/SanCov.cpp
index f77dbcea2d..d8ddf2487a 100644
--- a/Kernel/SanCov.cpp
+++ b/Kernel/SanCov.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/Devices/KCOVDevice.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
extern bool g_in_early_boot;
diff --git a/Kernel/Security/Jail.cpp b/Kernel/Security/Jail.cpp
index 78f546d29e..284f74cac3 100644
--- a/Kernel/Security/Jail.cpp
+++ b/Kernel/Security/Jail.cpp
@@ -7,8 +7,8 @@
#include <AK/IntrusiveList.h>
#include <AK/Singleton.h>
#include <Kernel/API/Jail.h>
-#include <Kernel/Process.h>
#include <Kernel/Security/Jail.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Security/Jail.h b/Kernel/Security/Jail.h
index 72817db310..54d98c4014 100644
--- a/Kernel/Security/Jail.h
+++ b/Kernel/Security/Jail.h
@@ -17,7 +17,7 @@
#include <AK/Types.h>
#include <Kernel/KString.h>
#include <Kernel/Locking/SpinlockProtected.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp
index 7410d1f74a..b287287619 100644
--- a/Kernel/Syscall.cpp
+++ b/Kernel/Syscall.cpp
@@ -11,10 +11,10 @@
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
-#include <Kernel/ThreadTracer.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/ThreadTracer.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/alarm.cpp b/Kernel/Syscalls/alarm.cpp
index 169dd070c8..fdd77f2d53 100644
--- a/Kernel/Syscalls/alarm.cpp
+++ b/Kernel/Syscalls/alarm.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
#include <Kernel/TimerQueue.h>
diff --git a/Kernel/Syscalls/anon_create.cpp b/Kernel/Syscalls/anon_create.cpp
index c7645ce2e1..31c1a91da0 100644
--- a/Kernel/Syscalls/anon_create.cpp
+++ b/Kernel/Syscalls/anon_create.cpp
@@ -7,7 +7,7 @@
#include <Kernel/FileSystem/AnonymousFile.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/Memory/AnonymousVMObject.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/beep.cpp b/Kernel/Syscalls/beep.cpp
index 7c4f547e17..dde536132a 100644
--- a/Kernel/Syscalls/beep.cpp
+++ b/Kernel/Syscalls/beep.cpp
@@ -8,7 +8,7 @@
#if ARCH(X86_64)
# include <Kernel/Arch/x86_64/PCSpeaker.h>
#endif
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/chdir.cpp b/Kernel/Syscalls/chdir.cpp
index 0df61f7e1d..47625d050c 100644
--- a/Kernel/Syscalls/chdir.cpp
+++ b/Kernel/Syscalls/chdir.cpp
@@ -7,7 +7,7 @@
#include <AK/RefPtr.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/chmod.cpp b/Kernel/Syscalls/chmod.cpp
index e5ddc1530f..a6eeae4e3a 100644
--- a/Kernel/Syscalls/chmod.cpp
+++ b/Kernel/Syscalls/chmod.cpp
@@ -7,7 +7,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/chown.cpp b/Kernel/Syscalls/chown.cpp
index 6616ed7999..7e8ea355f2 100644
--- a/Kernel/Syscalls/chown.cpp
+++ b/Kernel/Syscalls/chown.cpp
@@ -8,7 +8,7 @@
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/clock.cpp b/Kernel/Syscalls/clock.cpp
index 04be07de11..d85b111b07 100644
--- a/Kernel/Syscalls/clock.cpp
+++ b/Kernel/Syscalls/clock.cpp
@@ -5,7 +5,7 @@
*/
#include <AK/Time.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/debug.cpp b/Kernel/Syscalls/debug.cpp
index ec3737327e..c18dcf3575 100644
--- a/Kernel/Syscalls/debug.cpp
+++ b/Kernel/Syscalls/debug.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/KSyms.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/UserOrKernelBuffer.h>
#include <Kernel/kstdio.h>
diff --git a/Kernel/Syscalls/disown.cpp b/Kernel/Syscalls/disown.cpp
index 685f2de69f..d68bdb51e5 100644
--- a/Kernel/Syscalls/disown.cpp
+++ b/Kernel/Syscalls/disown.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/dup2.cpp b/Kernel/Syscalls/dup2.cpp
index cea5737dd4..dab016e6a4 100644
--- a/Kernel/Syscalls/dup2.cpp
+++ b/Kernel/Syscalls/dup2.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/emuctl.cpp b/Kernel/Syscalls/emuctl.cpp
index 85064065f6..1599fa60bb 100644
--- a/Kernel/Syscalls/emuctl.cpp
+++ b/Kernel/Syscalls/emuctl.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp
index 3bf4edd941..dc2499e4fe 100644
--- a/Kernel/Syscalls/execve.cpp
+++ b/Kernel/Syscalls/execve.cpp
@@ -17,9 +17,9 @@
#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
-#include <Kernel/Scheduler.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Time/TimeManagement.h>
#include <LibELF/AuxiliaryVector.h>
#include <LibELF/Image.h>
diff --git a/Kernel/Syscalls/exit.cpp b/Kernel/Syscalls/exit.cpp
index ef5d5450c1..e257f0ebb9 100644
--- a/Kernel/Syscalls/exit.cpp
+++ b/Kernel/Syscalls/exit.cpp
@@ -6,8 +6,8 @@
#include <Kernel/KSyms.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/faccessat.cpp b/Kernel/Syscalls/faccessat.cpp
index 5c621c9140..32918ecde5 100644
--- a/Kernel/Syscalls/faccessat.cpp
+++ b/Kernel/Syscalls/faccessat.cpp
@@ -6,7 +6,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/fallocate.cpp b/Kernel/Syscalls/fallocate.cpp
index 8f924219ed..708e165e1a 100644
--- a/Kernel/Syscalls/fallocate.cpp
+++ b/Kernel/Syscalls/fallocate.cpp
@@ -8,7 +8,7 @@
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/FileSystem/InodeFile.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/fcntl.cpp b/Kernel/Syscalls/fcntl.cpp
index 81dcef7325..528ba24489 100644
--- a/Kernel/Syscalls/fcntl.cpp
+++ b/Kernel/Syscalls/fcntl.cpp
@@ -6,7 +6,7 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/fork.cpp b/Kernel/Syscalls/fork.cpp
index 927ad57e43..da478ed134 100644
--- a/Kernel/Syscalls/fork.cpp
+++ b/Kernel/Syscalls/fork.cpp
@@ -9,9 +9,9 @@
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/Memory/Region.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/TTY/TTY.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/fsync.cpp b/Kernel/Syscalls/fsync.cpp
index 89b91152fd..4b7cd25736 100644
--- a/Kernel/Syscalls/fsync.cpp
+++ b/Kernel/Syscalls/fsync.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/ftruncate.cpp b/Kernel/Syscalls/ftruncate.cpp
index 5bde524874..b0f972b770 100644
--- a/Kernel/Syscalls/ftruncate.cpp
+++ b/Kernel/Syscalls/ftruncate.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/futex.cpp b/Kernel/Syscalls/futex.cpp
index b88ed5deaa..c6ee2c88c4 100644
--- a/Kernel/Syscalls/futex.cpp
+++ b/Kernel/Syscalls/futex.cpp
@@ -9,7 +9,7 @@
#include <Kernel/Debug.h>
#include <Kernel/Memory/InodeVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/get_dir_entries.cpp b/Kernel/Syscalls/get_dir_entries.cpp
index 530eb575a8..680061268e 100644
--- a/Kernel/Syscalls/get_dir_entries.cpp
+++ b/Kernel/Syscalls/get_dir_entries.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/get_stack_bounds.cpp b/Kernel/Syscalls/get_stack_bounds.cpp
index 7fdbfdd0e8..c8dcb370e3 100644
--- a/Kernel/Syscalls/get_stack_bounds.cpp
+++ b/Kernel/Syscalls/get_stack_bounds.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/Memory/Region.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/getrandom.cpp b/Kernel/Syscalls/getrandom.cpp
index 6fcea76042..76144d6315 100644
--- a/Kernel/Syscalls/getrandom.cpp
+++ b/Kernel/Syscalls/getrandom.cpp
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
#include <Kernel/Random.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/UserOrKernelBuffer.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/getuid.cpp b/Kernel/Syscalls/getuid.cpp
index 3851b9c706..3abdc1d76e 100644
--- a/Kernel/Syscalls/getuid.cpp
+++ b/Kernel/Syscalls/getuid.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/hostname.cpp b/Kernel/Syscalls/hostname.cpp
index 6d7ebe09bf..988583ca7a 100644
--- a/Kernel/Syscalls/hostname.cpp
+++ b/Kernel/Syscalls/hostname.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/inode_watcher.cpp b/Kernel/Syscalls/inode_watcher.cpp
index 476abd2f69..926868b2e2 100644
--- a/Kernel/Syscalls/inode_watcher.cpp
+++ b/Kernel/Syscalls/inode_watcher.cpp
@@ -10,7 +10,7 @@
#include <Kernel/FileSystem/InodeWatcher.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/ioctl.cpp b/Kernel/Syscalls/ioctl.cpp
index f83affd14d..bc258ae919 100644
--- a/Kernel/Syscalls/ioctl.cpp
+++ b/Kernel/Syscalls/ioctl.cpp
@@ -7,7 +7,7 @@
#include <AK/Userspace.h>
#include <Kernel/API/Ioctl.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/jail.cpp b/Kernel/Syscalls/jail.cpp
index d27fcb1672..e58f065e9c 100644
--- a/Kernel/Syscalls/jail.cpp
+++ b/Kernel/Syscalls/jail.cpp
@@ -6,9 +6,9 @@
#include <AK/Userspace.h>
#include <Kernel/API/Jail.h>
-#include <Kernel/Process.h>
#include <Kernel/Security/Jail.h>
#include <Kernel/StdLib.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/keymap.cpp b/Kernel/Syscalls/keymap.cpp
index 3c836d2f79..63a594f3c4 100644
--- a/Kernel/Syscalls/keymap.cpp
+++ b/Kernel/Syscalls/keymap.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/Devices/HID/Management.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/kill.cpp b/Kernel/Syscalls/kill.cpp
index fe94832ee4..7cbcaa6843 100644
--- a/Kernel/Syscalls/kill.cpp
+++ b/Kernel/Syscalls/kill.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/link.cpp b/Kernel/Syscalls/link.cpp
index a94f02ac2f..a9abe884d0 100644
--- a/Kernel/Syscalls/link.cpp
+++ b/Kernel/Syscalls/link.cpp
@@ -6,7 +6,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/lseek.cpp b/Kernel/Syscalls/lseek.cpp
index 52e15bef50..cc4120e38d 100644
--- a/Kernel/Syscalls/lseek.cpp
+++ b/Kernel/Syscalls/lseek.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/mkdir.cpp b/Kernel/Syscalls/mkdir.cpp
index e614316c8b..59067c148c 100644
--- a/Kernel/Syscalls/mkdir.cpp
+++ b/Kernel/Syscalls/mkdir.cpp
@@ -6,7 +6,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/mknod.cpp b/Kernel/Syscalls/mknod.cpp
index eeffdd72cd..45f558cb52 100644
--- a/Kernel/Syscalls/mknod.cpp
+++ b/Kernel/Syscalls/mknod.cpp
@@ -6,7 +6,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp
index 587793c14c..9ae33bd4a6 100644
--- a/Kernel/Syscalls/mmap.cpp
+++ b/Kernel/Syscalls/mmap.cpp
@@ -19,7 +19,7 @@
#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <LibELF/Validation.h>
#if ARCH(X86_64)
diff --git a/Kernel/Syscalls/mount.cpp b/Kernel/Syscalls/mount.cpp
index e945515141..ae4fedc979 100644
--- a/Kernel/Syscalls/mount.cpp
+++ b/Kernel/Syscalls/mount.cpp
@@ -14,7 +14,7 @@
#include <Kernel/FileSystem/RAMFS/FileSystem.h>
#include <Kernel/FileSystem/SysFS/FileSystem.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/open.cpp b/Kernel/Syscalls/open.cpp
index 2ea0cc1e80..cd45442461 100644
--- a/Kernel/Syscalls/open.cpp
+++ b/Kernel/Syscalls/open.cpp
@@ -10,7 +10,7 @@
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/KLexicalPath.h>
#include <Kernel/Net/LocalSocket.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/perf_event.cpp b/Kernel/Syscalls/perf_event.cpp
index bde0e260d6..543d3d0224 100644
--- a/Kernel/Syscalls/perf_event.cpp
+++ b/Kernel/Syscalls/perf_event.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/PerformanceEventBuffer.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/pipe.cpp b/Kernel/Syscalls/pipe.cpp
index 74dc6e100e..f5868f6770 100644
--- a/Kernel/Syscalls/pipe.cpp
+++ b/Kernel/Syscalls/pipe.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/FIFO.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/pledge.cpp b/Kernel/Syscalls/pledge.cpp
index 72079ae515..9610a74715 100644
--- a/Kernel/Syscalls/pledge.cpp
+++ b/Kernel/Syscalls/pledge.cpp
@@ -5,7 +5,7 @@
*/
#include <AK/StringView.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/poll.cpp b/Kernel/Syscalls/poll.cpp
index 86a93e621c..6c529dfbc7 100644
--- a/Kernel/Syscalls/poll.cpp
+++ b/Kernel/Syscalls/poll.cpp
@@ -9,7 +9,7 @@
#include <Kernel/API/POSIX/select.h>
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/prctl.cpp b/Kernel/Syscalls/prctl.cpp
index b152e51d11..4eeabe2d14 100644
--- a/Kernel/Syscalls/prctl.cpp
+++ b/Kernel/Syscalls/prctl.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/API/prctl_numbers.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/process.cpp b/Kernel/Syscalls/process.cpp
index 1f165eb2ef..6389502601 100644
--- a/Kernel/Syscalls/process.cpp
+++ b/Kernel/Syscalls/process.cpp
@@ -5,7 +5,7 @@
*/
#include <AK/Types.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/profiling.cpp b/Kernel/Syscalls/profiling.cpp
index e8ebd678ac..01d5fcd576 100644
--- a/Kernel/Syscalls/profiling.cpp
+++ b/Kernel/Syscalls/profiling.cpp
@@ -6,8 +6,8 @@
#include <Kernel/Coredump.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp
index 1d266c30f6..5528e3b28c 100644
--- a/Kernel/Syscalls/ptrace.cpp
+++ b/Kernel/Syscalls/ptrace.cpp
@@ -10,9 +10,9 @@
#include <Kernel/Memory/Region.h>
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>
#include <Kernel/Memory/SharedInodeVMObject.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
-#include <Kernel/ThreadTracer.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/ThreadTracer.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/purge.cpp b/Kernel/Syscalls/purge.cpp
index 50af18da03..6659e2655f 100644
--- a/Kernel/Syscalls/purge.cpp
+++ b/Kernel/Syscalls/purge.cpp
@@ -7,7 +7,7 @@
#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Memory/InodeVMObject.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/read.cpp b/Kernel/Syscalls/read.cpp
index c7eb069961..b350e17691 100644
--- a/Kernel/Syscalls/read.cpp
+++ b/Kernel/Syscalls/read.cpp
@@ -7,7 +7,7 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/readlink.cpp b/Kernel/Syscalls/readlink.cpp
index 1f4c0f1cae..96450f47cc 100644
--- a/Kernel/Syscalls/readlink.cpp
+++ b/Kernel/Syscalls/readlink.cpp
@@ -6,7 +6,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/realpath.cpp b/Kernel/Syscalls/realpath.cpp
index a6c7f6df7f..48bc990fa8 100644
--- a/Kernel/Syscalls/realpath.cpp
+++ b/Kernel/Syscalls/realpath.cpp
@@ -7,7 +7,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/rename.cpp b/Kernel/Syscalls/rename.cpp
index 102295d2fe..48745df2c3 100644
--- a/Kernel/Syscalls/rename.cpp
+++ b/Kernel/Syscalls/rename.cpp
@@ -6,7 +6,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/resource.cpp b/Kernel/Syscalls/resource.cpp
index fd3976ebcf..1e3f3c4fa3 100644
--- a/Kernel/Syscalls/resource.cpp
+++ b/Kernel/Syscalls/resource.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/rmdir.cpp b/Kernel/Syscalls/rmdir.cpp
index 42e77a33fa..adbc35c0d9 100644
--- a/Kernel/Syscalls/rmdir.cpp
+++ b/Kernel/Syscalls/rmdir.cpp
@@ -6,7 +6,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/sched.cpp b/Kernel/Syscalls/sched.cpp
index a1c854556d..12ed9d6e71 100644
--- a/Kernel/Syscalls/sched.cpp
+++ b/Kernel/Syscalls/sched.cpp
@@ -6,8 +6,8 @@
*/
#include <Kernel/API/Syscall.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/sendfd.cpp b/Kernel/Syscalls/sendfd.cpp
index 254e0aa827..78e71f8eb8 100644
--- a/Kernel/Syscalls/sendfd.cpp
+++ b/Kernel/Syscalls/sendfd.cpp
@@ -6,7 +6,7 @@
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/Net/LocalSocket.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/setpgid.cpp b/Kernel/Syscalls/setpgid.cpp
index 7c768f16a1..b65f384819 100644
--- a/Kernel/Syscalls/setpgid.cpp
+++ b/Kernel/Syscalls/setpgid.cpp
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
#include <Kernel/TTY/TTY.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/setuid.cpp b/Kernel/Syscalls/setuid.cpp
index 20d8948eef..34d6561950 100644
--- a/Kernel/Syscalls/setuid.cpp
+++ b/Kernel/Syscalls/setuid.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/API/POSIX/sys/limits.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/sigaction.cpp b/Kernel/Syscalls/sigaction.cpp
index cd17407109..47dc72f50a 100644
--- a/Kernel/Syscalls/sigaction.cpp
+++ b/Kernel/Syscalls/sigaction.cpp
@@ -7,7 +7,7 @@
#include <Kernel/Arch/SmapDisabler.h>
#include <Kernel/InterruptDisabler.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/socket.cpp b/Kernel/Syscalls/socket.cpp
index 0c1fdfddb7..c8fd07c917 100644
--- a/Kernel/Syscalls/socket.cpp
+++ b/Kernel/Syscalls/socket.cpp
@@ -7,7 +7,7 @@
#include <AK/ByteBuffer.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/Net/LocalSocket.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/UnixTypes.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/stat.cpp b/Kernel/Syscalls/stat.cpp
index 7299241743..409b440c76 100644
--- a/Kernel/Syscalls/stat.cpp
+++ b/Kernel/Syscalls/stat.cpp
@@ -7,7 +7,7 @@
#include <AK/RefPtr.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/statvfs.cpp b/Kernel/Syscalls/statvfs.cpp
index c72799d070..2f18084fd1 100644
--- a/Kernel/Syscalls/statvfs.cpp
+++ b/Kernel/Syscalls/statvfs.cpp
@@ -6,7 +6,7 @@
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/sync.cpp b/Kernel/Syscalls/sync.cpp
index c3395977e0..260fa6c4cf 100644
--- a/Kernel/Syscalls/sync.cpp
+++ b/Kernel/Syscalls/sync.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/sysconf.cpp b/Kernel/Syscalls/sysconf.cpp
index d86511342d..b9d4ee0181 100644
--- a/Kernel/Syscalls/sysconf.cpp
+++ b/Kernel/Syscalls/sysconf.cpp
@@ -6,7 +6,7 @@
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/Memory/MemoryManager.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp
index 1afc29dd78..c2fbbd2485 100644
--- a/Kernel/Syscalls/thread.cpp
+++ b/Kernel/Syscalls/thread.cpp
@@ -7,8 +7,8 @@
#include <AK/Checked.h>
#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/times.cpp b/Kernel/Syscalls/times.cpp
index 8c8858896a..9c0d714a6d 100644
--- a/Kernel/Syscalls/times.cpp
+++ b/Kernel/Syscalls/times.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/umask.cpp b/Kernel/Syscalls/umask.cpp
index dc610e4c4d..77f41d3829 100644
--- a/Kernel/Syscalls/umask.cpp
+++ b/Kernel/Syscalls/umask.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/uname.cpp b/Kernel/Syscalls/uname.cpp
index 3c87e128cd..3b13fff8a9 100644
--- a/Kernel/Syscalls/uname.cpp
+++ b/Kernel/Syscalls/uname.cpp
@@ -6,7 +6,7 @@
*/
#include <AK/TypedTransfer.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Version.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/unlink.cpp b/Kernel/Syscalls/unlink.cpp
index 90a73bdf3e..0dc0ed7711 100644
--- a/Kernel/Syscalls/unlink.cpp
+++ b/Kernel/Syscalls/unlink.cpp
@@ -6,7 +6,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/unveil.cpp b/Kernel/Syscalls/unveil.cpp
index 83e53cc5a0..360d7d3c2f 100644
--- a/Kernel/Syscalls/unveil.cpp
+++ b/Kernel/Syscalls/unveil.cpp
@@ -11,7 +11,7 @@
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/KLexicalPath.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/utime.cpp b/Kernel/Syscalls/utime.cpp
index 322dd1251c..0b9da8f300 100644
--- a/Kernel/Syscalls/utime.cpp
+++ b/Kernel/Syscalls/utime.cpp
@@ -6,7 +6,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/utimensat.cpp b/Kernel/Syscalls/utimensat.cpp
index aa48aaf92e..643eeaba64 100644
--- a/Kernel/Syscalls/utimensat.cpp
+++ b/Kernel/Syscalls/utimensat.cpp
@@ -8,7 +8,7 @@
#include <AK/StringView.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/KLexicalPath.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/waitid.cpp b/Kernel/Syscalls/waitid.cpp
index 8a5e08313d..62bf0fe764 100644
--- a/Kernel/Syscalls/waitid.cpp
+++ b/Kernel/Syscalls/waitid.cpp
@@ -6,7 +6,7 @@
#include <AK/Variant.h>
#include <Kernel/Debug.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/write.cpp b/Kernel/Syscalls/write.cpp
index 0efffa6f46..4e474b0838 100644
--- a/Kernel/Syscalls/write.cpp
+++ b/Kernel/Syscalls/write.cpp
@@ -7,7 +7,7 @@
#include <AK/NumericLimits.h>
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/TTY/MasterPTY.cpp b/Kernel/TTY/MasterPTY.cpp
index 1faa423305..2fdba628a5 100644
--- a/Kernel/TTY/MasterPTY.cpp
+++ b/Kernel/TTY/MasterPTY.cpp
@@ -9,10 +9,10 @@
#include <Kernel/API/POSIX/signal_numbers.h>
#include <Kernel/Debug.h>
#include <Kernel/InterruptDisabler.h>
-#include <Kernel/Process.h>
#include <Kernel/TTY/MasterPTY.h>
#include <Kernel/TTY/PTYMultiplexer.h>
#include <Kernel/TTY/SlavePTY.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/TTY/SlavePTY.cpp b/Kernel/TTY/SlavePTY.cpp
index 8a5fab1a3c..55c3108217 100644
--- a/Kernel/TTY/SlavePTY.cpp
+++ b/Kernel/TTY/SlavePTY.cpp
@@ -6,9 +6,9 @@
#include <AK/Singleton.h>
#include <Kernel/Debug.h>
-#include <Kernel/Process.h>
#include <Kernel/TTY/MasterPTY.h>
#include <Kernel/TTY/SlavePTY.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp
index 90882d0f82..b172a148d7 100644
--- a/Kernel/TTY/TTY.cpp
+++ b/Kernel/TTY/TTY.cpp
@@ -14,7 +14,6 @@
#include <Kernel/API/ttydefaultschars.h>
#include <Kernel/Debug.h>
#include <Kernel/InterruptDisabler.h>
-#include <Kernel/Process.h>
#include <Kernel/TTY/TTY.h>
#include <Kernel/UnixTypes.h>
diff --git a/Kernel/TTY/TTY.h b/Kernel/TTY/TTY.h
index 9fcdc6fcab..19c9fc0c2b 100644
--- a/Kernel/TTY/TTY.h
+++ b/Kernel/TTY/TTY.h
@@ -10,7 +10,7 @@
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/DoubleBuffer.h>
#include <Kernel/Library/LockWeakPtr.h>
-#include <Kernel/ProcessGroup.h>
+#include <Kernel/Tasks/ProcessGroup.h>
#include <Kernel/UnixTypes.h>
#define TTY_BUFFER_SIZE 1024
diff --git a/Kernel/AtomicEdgeAction.h b/Kernel/Tasks/AtomicEdgeAction.h
index c80adcaa1d..c80adcaa1d 100644
--- a/Kernel/AtomicEdgeAction.h
+++ b/Kernel/Tasks/AtomicEdgeAction.h
diff --git a/Kernel/Tasks/FinalizerTask.cpp b/Kernel/Tasks/FinalizerTask.cpp
index b16450fbb0..94ab0241d6 100644
--- a/Kernel/Tasks/FinalizerTask.cpp
+++ b/Kernel/Tasks/FinalizerTask.cpp
@@ -4,10 +4,10 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
#include <Kernel/Tasks/FinalizerTask.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
namespace Kernel {
diff --git a/Kernel/FutexQueue.cpp b/Kernel/Tasks/FutexQueue.cpp
index d7cbf27c80..4c9f9f2df6 100644
--- a/Kernel/FutexQueue.cpp
+++ b/Kernel/Tasks/FutexQueue.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/Debug.h>
-#include <Kernel/FutexQueue.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/FutexQueue.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/FutexQueue.h b/Kernel/Tasks/FutexQueue.h
index 4ea51ac579..3b53c25ee3 100644
--- a/Kernel/FutexQueue.h
+++ b/Kernel/Tasks/FutexQueue.h
@@ -8,7 +8,7 @@
#include <AK/AtomicRefCounted.h>
#include <Kernel/Locking/Spinlock.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/Process.cpp b/Kernel/Tasks/Process.cpp
index e8b80deead..7f7ed579b7 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Tasks/Process.cpp
@@ -32,13 +32,13 @@
#include <Kernel/Panic.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
#include <Kernel/StdLib.h>
#include <Kernel/TTY/TTY.h>
-#include <Kernel/Thread.h>
-#include <Kernel/ThreadTracer.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
+#include <Kernel/Tasks/ThreadTracer.h>
#include <Kernel/TimerQueue.h>
namespace Kernel {
diff --git a/Kernel/Process.h b/Kernel/Tasks/Process.h
index 3bb324d3b0..4968f2043b 100644
--- a/Kernel/Process.h
+++ b/Kernel/Tasks/Process.h
@@ -18,23 +18,23 @@
#include <Kernel/API/POSIX/sys/resource.h>
#include <Kernel/API/Syscall.h>
#include <Kernel/Assertions.h>
-#include <Kernel/AtomicEdgeAction.h>
#include <Kernel/Credentials.h>
#include <Kernel/FileSystem/InodeMetadata.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/FileSystem/UnveilNode.h>
#include <Kernel/Forward.h>
-#include <Kernel/FutexQueue.h>
#include <Kernel/Library/LockWeakPtr.h>
#include <Kernel/Library/LockWeakable.h>
#include <Kernel/Locking/Mutex.h>
#include <Kernel/Locking/MutexProtected.h>
#include <Kernel/Memory/AddressSpace.h>
#include <Kernel/PerformanceEventBuffer.h>
-#include <Kernel/ProcessGroup.h>
#include <Kernel/Security/Jail.h>
#include <Kernel/StdLib.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/AtomicEdgeAction.h>
+#include <Kernel/Tasks/FutexQueue.h>
+#include <Kernel/Tasks/ProcessGroup.h>
+#include <Kernel/Tasks/Thread.h>
#include <Kernel/UnixTypes.h>
#include <LibC/elf.h>
diff --git a/Kernel/ProcessGroup.cpp b/Kernel/Tasks/ProcessGroup.cpp
index 2e28beda95..79a9cbb27f 100644
--- a/Kernel/ProcessGroup.cpp
+++ b/Kernel/Tasks/ProcessGroup.cpp
@@ -6,7 +6,7 @@
*/
#include <AK/Singleton.h>
-#include <Kernel/ProcessGroup.h>
+#include <Kernel/Tasks/ProcessGroup.h>
namespace Kernel {
diff --git a/Kernel/ProcessGroup.h b/Kernel/Tasks/ProcessGroup.h
index 2f74ff8d79..2f74ff8d79 100644
--- a/Kernel/ProcessGroup.h
+++ b/Kernel/Tasks/ProcessGroup.h
diff --git a/Kernel/ProcessList.cpp b/Kernel/Tasks/ProcessList.cpp
index aae12f7250..6e5d765e68 100644
--- a/Kernel/ProcessList.cpp
+++ b/Kernel/Tasks/ProcessList.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/Process.h>
+#include <Kernel/Tasks/Process.h>
namespace Kernel {
diff --git a/Kernel/Scheduler.cpp b/Kernel/Tasks/Scheduler.cpp
index 454038b2d6..f1d271a880 100644
--- a/Kernel/Scheduler.cpp
+++ b/Kernel/Tasks/Scheduler.cpp
@@ -13,9 +13,9 @@
#include <Kernel/InterruptDisabler.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Time/TimeManagement.h>
#include <Kernel/kstdio.h>
diff --git a/Kernel/Scheduler.h b/Kernel/Tasks/Scheduler.h
index ae7b6a5783..ae7b6a5783 100644
--- a/Kernel/Scheduler.h
+++ b/Kernel/Tasks/Scheduler.h
diff --git a/Kernel/Tasks/SyncTask.cpp b/Kernel/Tasks/SyncTask.cpp
index b4715a11eb..7de469dc4c 100644
--- a/Kernel/Tasks/SyncTask.cpp
+++ b/Kernel/Tasks/SyncTask.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/FileSystem/VirtualFileSystem.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Process.h>
#include <Kernel/Tasks/SyncTask.h>
#include <Kernel/Time/TimeManagement.h>
diff --git a/Kernel/Thread.cpp b/Kernel/Tasks/Thread.cpp
index d7ab03840b..1b9d9d12d8 100644
--- a/Kernel/Thread.cpp
+++ b/Kernel/Tasks/Thread.cpp
@@ -22,11 +22,11 @@
#include <Kernel/Memory/ScopedAddressSpaceSwitcher.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceEventBuffer.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
-#include <Kernel/Thread.h>
-#include <Kernel/ThreadTracer.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
+#include <Kernel/Tasks/ThreadTracer.h>
#include <Kernel/TimerQueue.h>
#include <Kernel/kstdio.h>
diff --git a/Kernel/Thread.h b/Kernel/Tasks/Thread.h
index a13259e5e6..a13259e5e6 100644
--- a/Kernel/Thread.h
+++ b/Kernel/Tasks/Thread.h
diff --git a/Kernel/ThreadBlockers.cpp b/Kernel/Tasks/ThreadBlockers.cpp
index 50e0b8b736..e947261800 100644
--- a/Kernel/ThreadBlockers.cpp
+++ b/Kernel/Tasks/ThreadBlockers.cpp
@@ -9,9 +9,9 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/Net/Socket.h>
-#include <Kernel/Process.h>
-#include <Kernel/Scheduler.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/Scheduler.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/ThreadTracer.cpp b/Kernel/Tasks/ThreadTracer.cpp
index 97d811bf47..fab074982d 100644
--- a/Kernel/ThreadTracer.cpp
+++ b/Kernel/Tasks/ThreadTracer.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/Arch/RegisterState.h>
-#include <Kernel/ThreadTracer.h>
+#include <Kernel/Tasks/ThreadTracer.h>
namespace Kernel {
diff --git a/Kernel/ThreadTracer.h b/Kernel/Tasks/ThreadTracer.h
index 892cda9046..892cda9046 100644
--- a/Kernel/ThreadTracer.h
+++ b/Kernel/Tasks/ThreadTracer.h
diff --git a/Kernel/WaitQueue.cpp b/Kernel/Tasks/WaitQueue.cpp
index e1e2a80c06..4245712c78 100644
--- a/Kernel/WaitQueue.cpp
+++ b/Kernel/Tasks/WaitQueue.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/Debug.h>
-#include <Kernel/Thread.h>
-#include <Kernel/WaitQueue.h>
+#include <Kernel/Tasks/Thread.h>
+#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/WaitQueue.h b/Kernel/Tasks/WaitQueue.h
index d5f4145e76..a5e60d62aa 100644
--- a/Kernel/WaitQueue.h
+++ b/Kernel/Tasks/WaitQueue.h
@@ -8,7 +8,7 @@
#include <AK/Atomic.h>
#include <Kernel/Locking/Spinlock.h>
-#include <Kernel/Thread.h>
+#include <Kernel/Tasks/Thread.h>
namespace Kernel {
diff --git a/Kernel/WorkQueue.cpp b/Kernel/Tasks/WorkQueue.cpp
index 7c0492737b..fb9d358c33 100644
--- a/Kernel/WorkQueue.cpp
+++ b/Kernel/Tasks/WorkQueue.cpp
@@ -6,10 +6,10 @@
*/
#include <Kernel/Arch/Processor.h>
-#include <Kernel/Process.h>
#include <Kernel/Sections.h>
-#include <Kernel/WaitQueue.h>
-#include <Kernel/WorkQueue.h>
+#include <Kernel/Tasks/Process.h>
+#include <Kernel/Tasks/WaitQueue.h>
+#include <Kernel/Tasks/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/WorkQueue.h b/Kernel/Tasks/WorkQueue.h
index b14736b6c0..a28166b974 100644
--- a/Kernel/WorkQueue.h
+++ b/Kernel/Tasks/WorkQueue.h
@@ -11,7 +11,7 @@
#include <AK/IntrusiveList.h>
#include <Kernel/Forward.h>
#include <Kernel/Locking/SpinlockProtected.h>
-#include <Kernel/WaitQueue.h>
+#include <Kernel/Tasks/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Time/TimeManagement.cpp b/Kernel/Time/TimeManagement.cpp
index a918dbb771..da74466379 100644
--- a/Kernel/Time/TimeManagement.cpp
+++ b/Kernel/Time/TimeManagement.cpp
@@ -27,8 +27,8 @@
#include <Kernel/Firmware/ACPI/Parser.h>
#include <Kernel/InterruptDisabler.h>
#include <Kernel/PerformanceManager.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Time/HardwareTimer.h>
#include <Kernel/Time/TimeManagement.h>
#include <Kernel/TimerQueue.h>
diff --git a/Kernel/TimerQueue.cpp b/Kernel/TimerQueue.cpp
index 599ecf6248..7e4f8cbe41 100644
--- a/Kernel/TimerQueue.cpp
+++ b/Kernel/TimerQueue.cpp
@@ -6,8 +6,8 @@
#include <AK/Singleton.h>
#include <AK/Time.h>
-#include <Kernel/Scheduler.h>
#include <Kernel/Sections.h>
+#include <Kernel/Tasks/Scheduler.h>
#include <Kernel/Time/TimeManagement.h>
#include <Kernel/TimerQueue.h>