Kernel: Reduce header dependencies of Process and Thread

This commit is contained in:
Andreas Kling 2020-02-16 02:01:42 +01:00
parent e61cdf5c39
commit 16818322c5
Notes: sideshowbarker 2024-07-19 09:17:20 +09:00
5 changed files with 14 additions and 8 deletions

View File

@ -49,6 +49,7 @@
#include <Kernel/Net/UDPSocket.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/Profiling.h>
#include <Kernel/TTY/TTY.h>
#include <Kernel/VM/MemoryManager.h>
#include <Kernel/VM/PurgeableVMObject.h>
#include <LibBareMetal/Output/Console.h>

View File

@ -45,6 +45,7 @@ class KBuffer;
class KResult;
class LocalSocket;
class PageDirectory;
class PerformanceEventBuffer;
class PhysicalPage;
class PhysicalRegion;
class Process;
@ -57,6 +58,7 @@ class Scheduler;
class SharedBuffer;
class Socket;
class TCPSocket;
class TTY;
class Thread;
class UDPSocket;
class VMObject;

View File

@ -54,6 +54,7 @@
#include <Kernel/Module.h>
#include <Kernel/Multiboot.h>
#include <Kernel/Net/Socket.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/Process.h>
#include <Kernel/ProcessTracer.h>
#include <Kernel/Profiling.h>
@ -63,6 +64,7 @@
#include <Kernel/SharedBuffer.h>
#include <Kernel/Syscall.h>
#include <Kernel/TTY/MasterPTY.h>
#include <Kernel/TTY/TTY.h>
#include <Kernel/Thread.h>
#include <Kernel/VM/InodeVMObject.h>
#include <Kernel/VM/PageDirectory.h>
@ -4731,4 +4733,9 @@ int Process::sys$perf_event(int type, uintptr_t arg1, uintptr_t arg2)
return m_perf_event_buffer->append(type, arg1, arg2);
}
void Process::set_tty(TTY* tty)
{
m_tty = tty;
}
}

View File

@ -26,19 +26,18 @@
#pragma once
#include <AK/HashMap.h>
#include <AK/InlineLinkedList.h>
#include <AK/NonnullRefPtrVector.h>
#include <AK/NonnullOwnPtrVector.h>
#include <AK/String.h>
#include <AK/Types.h>
#include <AK/Vector.h>
#include <AK/WeakPtr.h>
#include <AK/Weakable.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/FileSystem/InodeMetadata.h>
#include <Kernel/Forward.h>
#include <Kernel/Lock.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/Syscall.h>
#include <Kernel/TTY/TTY.h>
#include <Kernel/Thread.h>
#include <Kernel/UnixTypes.h>
#include <Kernel/VM/RangeAllocator.h>
@ -309,7 +308,7 @@ public:
[[nodiscard]] static siginfo_t reap(Process&);
const TTY* tty() const { return m_tty; }
void set_tty(TTY* tty) { m_tty = tty; }
void set_tty(TTY*);
size_t region_count() const { return m_regions.size(); }
const NonnullOwnPtrVector<Region>& regions() const { return m_regions; }

View File

@ -26,13 +26,10 @@
#pragma once
#include <AK/Atomic.h>
#include <AK/Function.h>
#include <AK/HashTable.h>
#include <AK/IntrusiveList.h>
#include <AK/Optional.h>
#include <AK/OwnPtr.h>
#include <AK/RefPtr.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <Kernel/Arch/i386/CPU.h>