diff options
author | Andreas Kling <kling@serenityos.org> | 2022-01-29 13:08:37 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-30 16:21:59 +0100 |
commit | 3845c90e08e6734b9e1a37411a5416ce7c473f43 (patch) | |
tree | 158ebc343a1e4615097c127f18b07d104727cdd5 | |
parent | f469fb47b85591aefa1577e8503c535fadca58c2 (diff) | |
download | serenity-3845c90e08e6734b9e1a37411a5416ce7c473f43.zip |
Kernel: Remove unnecessary includes from Thread.h
...and deal with the fallout by adding missing includes everywhere.
29 files changed, 33 insertions, 17 deletions
diff --git a/Kernel/Arch/x86/common/Interrupts.cpp b/Kernel/Arch/x86/common/Interrupts.cpp index 417b5dae35..d2af2608f3 100644 --- a/Kernel/Arch/x86/common/Interrupts.cpp +++ b/Kernel/Arch/x86/common/Interrupts.cpp @@ -15,6 +15,7 @@ #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> @@ -25,8 +26,8 @@ #include <Kernel/Arch/RegisterState.h> #include <Kernel/Arch/x86/ISRStubs.h> #include <Kernel/Arch/x86/PageFault.h> +#include <Kernel/Arch/x86/SafeMem.h> #include <Kernel/Arch/x86/TrapFrame.h> -#include <Kernel/KSyms.h> extern FlatPtr start_of_unmap_after_init; extern FlatPtr end_of_unmap_after_init; diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp index aeb8cd3d44..fe0db59a49 100644 --- a/Kernel/Arch/x86/common/Processor.cpp +++ b/Kernel/Arch/x86/common/Processor.cpp @@ -12,6 +12,7 @@ #include <Kernel/Interrupts/APIC.h> #include <Kernel/Process.h> +#include <Kernel/Scheduler.h> #include <Kernel/Sections.h> #include <Kernel/StdLib.h> #include <Kernel/Thread.h> diff --git a/Kernel/Arch/x86/i386/Processor.cpp b/Kernel/Arch/x86/i386/Processor.cpp index 90554edc42..b748bed21a 100644 --- a/Kernel/Arch/x86/i386/Processor.cpp +++ b/Kernel/Arch/x86/i386/Processor.cpp @@ -9,6 +9,7 @@ #include <Kernel/Arch/x86/TrapFrame.h> #include <Kernel/Process.h> #include <Kernel/Random.h> +#include <Kernel/Scheduler.h> #include <Kernel/Sections.h> #include <Kernel/Thread.h> diff --git a/Kernel/Arch/x86/x86_64/Processor.cpp b/Kernel/Arch/x86/x86_64/Processor.cpp index 38b998581a..08f29cb93a 100644 --- a/Kernel/Arch/x86/x86_64/Processor.cpp +++ b/Kernel/Arch/x86/x86_64/Processor.cpp @@ -10,6 +10,7 @@ #include <Kernel/Panic.h> #include <Kernel/Process.h> #include <Kernel/Random.h> +#include <Kernel/Scheduler.h> #include <Kernel/Sections.h> #include <Kernel/Thread.h> diff --git a/Kernel/Devices/HID/PS2KeyboardDevice.cpp b/Kernel/Devices/HID/PS2KeyboardDevice.cpp index 30785501d7..c492c9e621 100644 --- a/Kernel/Devices/HID/PS2KeyboardDevice.cpp +++ b/Kernel/Devices/HID/PS2KeyboardDevice.cpp @@ -5,14 +5,13 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include <AK/ByteBuffer.h> -#include <AK/Singleton.h> #include <AK/Types.h> #include <Kernel/Arch/x86/IO.h> #include <Kernel/Debug.h> #include <Kernel/Devices/DeviceManagement.h> #include <Kernel/Devices/HID/HIDManagement.h> #include <Kernel/Devices/HID/PS2KeyboardDevice.h> +#include <Kernel/Scheduler.h> #include <Kernel/Sections.h> #include <Kernel/TTY/ConsoleManagement.h> #include <Kernel/WorkQueue.h> diff --git a/Kernel/GlobalProcessExposed.cpp b/Kernel/GlobalProcessExposed.cpp index 8038387354..5072c5691c 100644 --- a/Kernel/GlobalProcessExposed.cpp +++ b/Kernel/GlobalProcessExposed.cpp @@ -6,12 +6,10 @@ #include <AK/JsonObjectSerializer.h> #include <AK/UBSanitizer.h> -#include <Kernel/Arch/x86/CPU.h> #include <Kernel/Arch/x86/InterruptDisabler.h> #include <Kernel/Arch/x86/ProcessorInfo.h> #include <Kernel/Bus/PCI/API.h> #include <Kernel/CommandLine.h> -#include <Kernel/Devices/ConsoleDevice.h> #include <Kernel/Devices/DeviceManagement.h> #include <Kernel/Devices/HID/HIDManagement.h> #include <Kernel/FileSystem/Custody.h> @@ -22,13 +20,13 @@ #include <Kernel/Interrupts/InterruptManagement.h> #include <Kernel/KBufferBuilder.h> #include <Kernel/Net/LocalSocket.h> -#include <Kernel/Net/NetworkAdapter.h> #include <Kernel/Net/NetworkingManagement.h> #include <Kernel/Net/Routing.h> #include <Kernel/Net/TCPSocket.h> #include <Kernel/Net/UDPSocket.h> #include <Kernel/Process.h> #include <Kernel/ProcessExposed.h> +#include <Kernel/Scheduler.h> #include <Kernel/Sections.h> #include <Kernel/TTY/TTY.h> diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp index ddae5cbbc5..5a46a6faac 100644 --- a/Kernel/Interrupts/APIC.cpp +++ b/Kernel/Interrupts/APIC.cpp @@ -20,6 +20,7 @@ #include <Kernel/Memory/PageDirectory.h> #include <Kernel/Memory/TypedMapping.h> #include <Kernel/Panic.h> +#include <Kernel/Scheduler.h> #include <Kernel/Sections.h> #include <Kernel/Thread.h> #include <Kernel/Time/APICTimer.h> diff --git a/Kernel/KSyms.cpp b/Kernel/KSyms.cpp index 171528c0be..8c56961436 100644 --- a/Kernel/KSyms.cpp +++ b/Kernel/KSyms.cpp @@ -6,6 +6,7 @@ #include <AK/TemporaryChange.h> #include <Kernel/Arch/SmapDisabler.h> +#include <Kernel/Arch/x86/SafeMem.h> #include <Kernel/FileSystem/OpenFileDescription.h> #include <Kernel/KSyms.h> #include <Kernel/Process.h> diff --git a/Kernel/Memory/AddressSpace.cpp b/Kernel/Memory/AddressSpace.cpp index b0c8e0b66e..a4379186b8 100644 --- a/Kernel/Memory/AddressSpace.cpp +++ b/Kernel/Memory/AddressSpace.cpp @@ -12,6 +12,7 @@ #include <Kernel/Memory/MemoryManager.h> #include <Kernel/PerformanceManager.h> #include <Kernel/Process.h> +#include <Kernel/Scheduler.h> namespace Kernel::Memory { diff --git a/Kernel/Memory/AnonymousVMObject.cpp b/Kernel/Memory/AnonymousVMObject.cpp index 5f7d3b6fca..925a023e65 100644 --- a/Kernel/Memory/AnonymousVMObject.cpp +++ b/Kernel/Memory/AnonymousVMObject.cpp @@ -5,6 +5,7 @@ */ #include <Kernel/Arch/SmapDisabler.h> +#include <Kernel/Arch/x86/SafeMem.h> #include <Kernel/Debug.h> #include <Kernel/Memory/AnonymousVMObject.h> #include <Kernel/Memory/MemoryManager.h> diff --git a/Kernel/Memory/Region.cpp b/Kernel/Memory/Region.cpp index c551cba7f8..f6e56730ed 100644 --- a/Kernel/Memory/Region.cpp +++ b/Kernel/Memory/Region.cpp @@ -16,6 +16,7 @@ #include <Kernel/Memory/SharedInodeVMObject.h> #include <Kernel/Panic.h> #include <Kernel/Process.h> +#include <Kernel/Scheduler.h> #include <Kernel/Thread.h> namespace Kernel::Memory { diff --git a/Kernel/PerformanceEventBuffer.cpp b/Kernel/PerformanceEventBuffer.cpp index 0b87a8b317..88e8fcceb9 100644 --- a/Kernel/PerformanceEventBuffer.cpp +++ b/Kernel/PerformanceEventBuffer.cpp @@ -9,6 +9,7 @@ #include <AK/ScopeGuard.h> #include <Kernel/Arch/RegisterState.h> #include <Kernel/Arch/SmapDisabler.h> +#include <Kernel/Arch/x86/SafeMem.h> #include <Kernel/FileSystem/Custody.h> #include <Kernel/KBufferBuilder.h> #include <Kernel/PerformanceEventBuffer.h> diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 7888644471..0cbb1f9449 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -29,11 +29,13 @@ #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/TimerQueue.h> #include <LibC/limits.h> namespace Kernel { diff --git a/Kernel/ProcessExposed.h b/Kernel/ProcessExposed.h index e7feccffce..f42e8ac735 100644 --- a/Kernel/ProcessExposed.h +++ b/Kernel/ProcessExposed.h @@ -15,6 +15,7 @@ #include <Kernel/FileSystem/FileSystem.h> #include <Kernel/FileSystem/OpenFileDescription.h> #include <Kernel/KBufferBuilder.h> +#include <Kernel/Time/TimeManagement.h> #include <Kernel/UserOrKernelBuffer.h> namespace Kernel { diff --git a/Kernel/StdLib.cpp b/Kernel/StdLib.cpp index 0adf596da1..6ab298649b 100644 --- a/Kernel/StdLib.cpp +++ b/Kernel/StdLib.cpp @@ -8,7 +8,7 @@ #include <AK/MemMem.h> #include <AK/Types.h> #include <Kernel/Arch/SmapDisabler.h> -#include <Kernel/Heap/kmalloc.h> +#include <Kernel/Arch/x86/SafeMem.h> #include <Kernel/Memory/MemoryManager.h> #include <Kernel/StdLib.h> diff --git a/Kernel/Storage/NVMe/NVMeController.cpp b/Kernel/Storage/NVMe/NVMeController.cpp index 15e4e9a926..0397273eea 100644 --- a/Kernel/Storage/NVMe/NVMeController.cpp +++ b/Kernel/Storage/NVMe/NVMeController.cpp @@ -10,6 +10,7 @@ #include <AK/Types.h> #include <Kernel/Arch/x86/IO.h> #include <Kernel/Arch/x86/Processor.h> +#include <Kernel/Arch/x86/SafeMem.h> #include <Kernel/Bus/PCI/API.h> #include <Kernel/Devices/Device.h> #include <Kernel/FileSystem/ProcFS.h> diff --git a/Kernel/Storage/NVMe/NVMeQueue.cpp b/Kernel/Storage/NVMe/NVMeQueue.cpp index f61890c7c9..5289f6446d 100644 --- a/Kernel/Storage/NVMe/NVMeQueue.cpp +++ b/Kernel/Storage/NVMe/NVMeQueue.cpp @@ -7,8 +7,8 @@ #include "NVMeQueue.h" #include "Kernel/StdLib.h" #include <Kernel/Arch/x86/IO.h> +#include <Kernel/Scheduler.h> #include <Kernel/Storage/NVMe/NVMeController.h> -#include <Kernel/Storage/NVMe/NVMeQueue.h> #include <Kernel/WorkQueue.h> namespace Kernel { diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp index dfd057fa26..1d93502d19 100644 --- a/Kernel/Syscall.cpp +++ b/Kernel/Syscall.cpp @@ -11,6 +11,7 @@ #include <Kernel/Panic.h> #include <Kernel/PerformanceManager.h> #include <Kernel/Process.h> +#include <Kernel/Scheduler.h> #include <Kernel/Sections.h> #include <Kernel/ThreadTracer.h> diff --git a/Kernel/Syscalls/alarm.cpp b/Kernel/Syscalls/alarm.cpp index 577a11b315..da57219c25 100644 --- a/Kernel/Syscalls/alarm.cpp +++ b/Kernel/Syscalls/alarm.cpp @@ -6,6 +6,7 @@ #include <Kernel/Process.h> #include <Kernel/Time/TimeManagement.h> +#include <Kernel/TimerQueue.h> namespace Kernel { diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index 127387ce39..e05bf3b17f 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -19,6 +19,7 @@ #include <Kernel/PerformanceManager.h> #include <Kernel/Process.h> #include <Kernel/Random.h> +#include <Kernel/Scheduler.h> #include <Kernel/Time/TimeManagement.h> #include <LibC/limits.h> #include <LibELF/AuxiliaryVector.h> diff --git a/Kernel/Syscalls/fork.cpp b/Kernel/Syscalls/fork.cpp index 7593db7e49..7b18227f36 100644 --- a/Kernel/Syscalls/fork.cpp +++ b/Kernel/Syscalls/fork.cpp @@ -6,10 +6,10 @@ #include <Kernel/Debug.h> #include <Kernel/FileSystem/Custody.h> -#include <Kernel/FileSystem/OpenFileDescription.h> #include <Kernel/Memory/Region.h> #include <Kernel/PerformanceManager.h> #include <Kernel/Process.h> +#include <Kernel/Scheduler.h> namespace Kernel { diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp index 30f1c90e79..b408657a83 100644 --- a/Kernel/Syscalls/mmap.cpp +++ b/Kernel/Syscalls/mmap.cpp @@ -7,6 +7,7 @@ #include <Kernel/Arch/SmapDisabler.h> #include <Kernel/Arch/x86/MSR.h> +#include <Kernel/Arch/x86/SafeMem.h> #include <Kernel/FileSystem/OpenFileDescription.h> #include <Kernel/Memory/AnonymousVMObject.h> #include <Kernel/Memory/MemoryManager.h> diff --git a/Kernel/Syscalls/profiling.cpp b/Kernel/Syscalls/profiling.cpp index 1fd23a6fba..a244219ad1 100644 --- a/Kernel/Syscalls/profiling.cpp +++ b/Kernel/Syscalls/profiling.cpp @@ -5,9 +5,9 @@ */ #include <Kernel/Coredump.h> -#include <Kernel/FileSystem/VirtualFileSystem.h> #include <Kernel/PerformanceManager.h> #include <Kernel/Process.h> +#include <Kernel/Scheduler.h> #include <Kernel/Time/TimeManagement.h> namespace Kernel { diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp index 59fd80e249..26d5d92e71 100644 --- a/Kernel/Syscalls/ptrace.cpp +++ b/Kernel/Syscalls/ptrace.cpp @@ -6,12 +6,12 @@ */ #include <AK/ScopeGuard.h> -#include <Kernel/Memory/MemoryManager.h> #include <Kernel/Memory/PrivateInodeVMObject.h> #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> namespace Kernel { diff --git a/Kernel/Syscalls/sched.cpp b/Kernel/Syscalls/sched.cpp index e8abc88955..a10eee08da 100644 --- a/Kernel/Syscalls/sched.cpp +++ b/Kernel/Syscalls/sched.cpp @@ -5,6 +5,7 @@ */ #include <Kernel/Process.h> +#include <Kernel/Scheduler.h> namespace Kernel { diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp index c42618efa6..f34f9541c8 100644 --- a/Kernel/Syscalls/thread.cpp +++ b/Kernel/Syscalls/thread.cpp @@ -8,6 +8,7 @@ #include <Kernel/Memory/MemoryManager.h> #include <Kernel/PerformanceManager.h> #include <Kernel/Process.h> +#include <Kernel/Scheduler.h> namespace Kernel { diff --git a/Kernel/Tasks/FinalizerTask.cpp b/Kernel/Tasks/FinalizerTask.cpp index 8021453abb..23b1bb74a9 100644 --- a/Kernel/Tasks/FinalizerTask.cpp +++ b/Kernel/Tasks/FinalizerTask.cpp @@ -5,6 +5,7 @@ */ #include <Kernel/Process.h> +#include <Kernel/Scheduler.h> #include <Kernel/Sections.h> #include <Kernel/Tasks/FinalizerTask.h> diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index 0afb0c4229..df6af16399 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -7,6 +7,7 @@ #include <AK/ScopeGuard.h> #include <AK/Singleton.h> #include <AK/StringBuilder.h> +#include <AK/TemporaryChange.h> #include <AK/Time.h> #include <Kernel/Arch/SmapDisabler.h> #include <Kernel/Arch/x86/InterruptDisabler.h> diff --git a/Kernel/Thread.h b/Kernel/Thread.h index 69c660071e..a6f310d70a 100644 --- a/Kernel/Thread.h +++ b/Kernel/Thread.h @@ -9,19 +9,16 @@ #include <AK/Concepts.h> #include <AK/EnumBits.h> #include <AK/Error.h> -#include <AK/HashMap.h> #include <AK/IntrusiveList.h> #include <AK/Optional.h> #include <AK/OwnPtr.h> -#include <AK/TemporaryChange.h> #include <AK/Time.h> #include <AK/Variant.h> #include <AK/Vector.h> #include <AK/WeakPtr.h> #include <AK/Weakable.h> -#include <Kernel/Arch/x86/SafeMem.h> +#include <Kernel/Arch/RegisterState.h> #include <Kernel/Debug.h> -#include <Kernel/FileSystem/InodeIdentifier.h> #include <Kernel/Forward.h> #include <Kernel/KString.h> #include <Kernel/Library/ListedRefCounted.h> @@ -30,14 +27,14 @@ #include <Kernel/Locking/LockRank.h> #include <Kernel/Locking/SpinlockProtected.h> #include <Kernel/Memory/VirtualRange.h> -#include <Kernel/Scheduler.h> -#include <Kernel/TimerQueue.h> #include <Kernel/UnixTypes.h> #include <LibC/fd_set.h> #include <LibC/signal_numbers.h> namespace Kernel { +class Timer; + namespace Memory { extern RecursiveSpinlock s_mm_lock; } |