mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Kernel: Add forward declaration header
This commit is contained in:
parent
1d611e4a11
commit
e28809a996
Notes:
sideshowbarker
2024-07-19 09:17:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e28809a996d
19 changed files with 86 additions and 49 deletions
|
@ -24,10 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <Kernel/Arch/i386/PIT.h>
|
||||
#include <Kernel/Devices/FloppyDiskDevice.h>
|
||||
#include <Kernel/FileSystem/ProcFS.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/VM/MemoryManager.h>
|
||||
#include <LibBareMetal/IO.h>
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Arch/i386/CPU.h>
|
||||
#include <Kernel/Arch/i386/PIC.h>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <Kernel/Arch/i386/CPU.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/FileSystem/DiskBackedFileSystem.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/KBuffer.h>
|
||||
|
|
|
@ -26,13 +26,11 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "FileSystem.h"
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <Kernel/FileSystem/FileSystem.h>
|
||||
#include <Kernel/Forward.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class DiskCache;
|
||||
|
||||
class DiskBackedFS : public FS {
|
||||
public:
|
||||
virtual ~DiskBackedFS() override;
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
|
||||
#include <AK/Bitmap.h>
|
||||
#include <AK/BufferStream.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/FileSystem/Ext2FileSystem.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/FileSystem/ext2_fs.h>
|
||||
|
|
|
@ -30,16 +30,13 @@
|
|||
#include <AK/RefCounted.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/KResult.h>
|
||||
#include <Kernel/UnixTypes.h>
|
||||
#include <LibBareMetal/Memory/VirtualAddress.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class FileDescription;
|
||||
class Process;
|
||||
class Region;
|
||||
|
||||
// File is the base class for anything that can be referenced by a FileDescription.
|
||||
//
|
||||
// The most important functions in File are:
|
||||
|
|
|
@ -26,17 +26,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/FileSystem/InodeIdentifier.h>
|
||||
#include <Kernel/FileSystem/InodeMetadata.h>
|
||||
#include <Kernel/KResult.h>
|
||||
#include <Kernel/Lock.h>
|
||||
#include <Kernel/UnixTypes.h>
|
||||
|
|
|
@ -34,17 +34,12 @@
|
|||
#include <Kernel/FileSystem/FileSystem.h>
|
||||
#include <Kernel/FileSystem/InodeIdentifier.h>
|
||||
#include <Kernel/FileSystem/InodeMetadata.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/KResult.h>
|
||||
#include <Kernel/Lock.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class FileDescription;
|
||||
class InodeVMObject;
|
||||
class InodeWatcher;
|
||||
class LocalSocket;
|
||||
class Custody;
|
||||
|
||||
class Inode : public RefCounted<Inode>
|
||||
, public Weakable<Inode>
|
||||
, public InlineLinkedListNode<Inode> {
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <AK/JsonObjectSerializer.h>
|
||||
#include <AK/JsonValue.h>
|
||||
#include <Kernel/Arch/i386/CPU.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/FileSystem/Custody.h>
|
||||
#include <Kernel/FileSystem/DiskBackedFileSystem.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/FileSystem/FileSystem.h>
|
||||
#include <Kernel/FileSystem/Inode.h>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <Kernel/FileSystem/FileSystem.h>
|
||||
#include <Kernel/FileSystem/Inode.h>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <Kernel/Devices/CharacterDevice.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/FileSystem/Custody.h>
|
||||
#include <Kernel/FileSystem/DiskBackedFileSystem.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
|
|
68
Kernel/Forward.h
Normal file
68
Kernel/Forward.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class BlockDevice;
|
||||
class CharacterDevice;
|
||||
class Custody;
|
||||
class Device;
|
||||
class DiskCache;
|
||||
class DoubleBuffer;
|
||||
class File;
|
||||
class FileDescription;
|
||||
class IPv4Socket;
|
||||
class Inode;
|
||||
class InodeIdentifier;
|
||||
class InodeVMObject;
|
||||
class InodeWatcher;
|
||||
class KBuffer;
|
||||
class KResult;
|
||||
class LocalSocket;
|
||||
class PageDirectory;
|
||||
class PhysicalPage;
|
||||
class PhysicalRegion;
|
||||
class Process;
|
||||
class ProcessInspectionHandle;
|
||||
class ProcessTracer;
|
||||
class Range;
|
||||
class RangeAllocator;
|
||||
class Region;
|
||||
class Scheduler;
|
||||
class SharedBuffer;
|
||||
class Socket;
|
||||
class TCPSocket;
|
||||
class Thread;
|
||||
class UDPSocket;
|
||||
class VMObject;
|
||||
class WaitQueue;
|
||||
|
||||
template<typename T>
|
||||
class KResultOr;
|
||||
|
||||
}
|
|
@ -37,6 +37,7 @@
|
|||
// severely limited kmalloc heap.
|
||||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/LogStream.h>
|
||||
#include <Kernel/VM/MemoryManager.h>
|
||||
#include <Kernel/VM/Region.h>
|
||||
|
|
|
@ -30,12 +30,11 @@
|
|||
#include <AK/Atomic.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Arch/i386/CPU.h>
|
||||
#include <Kernel/Scheduler.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/WaitQueue.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class Thread;
|
||||
extern Thread* current;
|
||||
|
||||
class Lock {
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <AK/Types.h>
|
||||
#include <Kernel/Arch/i386/CPU.h>
|
||||
#include <Kernel/Arch/i386/PIT.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/Devices/KeyboardDevice.h>
|
||||
#include <Kernel/Devices/NullDevice.h>
|
||||
#include <Kernel/Devices/PCSpeaker.h>
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <AK/WeakPtr.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <Kernel/FileSystem/VirtualFileSystem.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/Lock.h>
|
||||
#include <Kernel/PerformanceEventBuffer.h>
|
||||
#include <Kernel/Syscall.h>
|
||||
|
@ -47,14 +48,6 @@ class ELFLoader;
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
class FileDescription;
|
||||
class KBuffer;
|
||||
class PageDirectory;
|
||||
class Region;
|
||||
class VMObject;
|
||||
class ProcessTracer;
|
||||
class SharedBuffer;
|
||||
|
||||
timeval kgettimeofday();
|
||||
void kgettimeofday(timeval&);
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <Kernel/Arch/i386/CPU.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/KResult.h>
|
||||
#include <Kernel/Scheduler.h>
|
||||
#include <Kernel/UnixTypes.h>
|
||||
|
@ -43,13 +44,6 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
class Alarm;
|
||||
class FileDescription;
|
||||
class Process;
|
||||
class ProcessInspectionHandle;
|
||||
class Region;
|
||||
class WaitQueue;
|
||||
|
||||
enum class ShouldUnblockThread {
|
||||
No = 0,
|
||||
Yes
|
||||
|
|
|
@ -26,23 +26,17 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/Bitmap.h>
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/NonnullRefPtrVector.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Arch/i386/CPU.h>
|
||||
#include <Kernel/FileSystem/InodeIdentifier.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/VM/PhysicalPage.h>
|
||||
#include <Kernel/VM/Region.h>
|
||||
#include <Kernel/VM/VMObject.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class PhysicalRegion;
|
||||
|
||||
#define PAGE_ROUND_UP(x) ((((u32)(x)) + PAGE_SIZE - 1) & (~(PAGE_SIZE - 1)))
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Reference in a new issue