ladybird/Kernel/Forward.h
Liav A ed67a877a3 Kernel+SystemServer+Base: Introduce the RAMFS filesystem
This filesystem is based on the code of the long-lived TmpFS. It differs
from that filesystem in one keypoint - its root inode doesn't have a
sticky bit on it.

Therefore, we mount it on /dev, to ensure only root can modify files on
that directory. In addition to that, /tmp is mounted directly in the
SystemServer main (start) code, so it's no longer specified in the fstab
file. We ensure that /tmp has a sticky bit and has the value 0777 for
root directory permissions, which is certainly a special case when using
RAM-backed (and in general other) filesystems.

Because of these 2 changes, it's no longer needed to maintain the TmpFS
filesystem, hence it's removed (renamed to RAMFS), because the RAMFS
represents the purpose of this filesystem in a much better way - it
relies on being backed by RAM "storage", and therefore it's easy to
conclude it's temporary and volatile, so its content is gone on either
system shutdown or unmounting of the filesystem.
2023-02-04 15:32:45 -07:00

108 lines
2.1 KiB
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/DistinctNumeric.h>
#include <Kernel/API/POSIX/sys/types.h>
namespace Kernel {
enum class LockRank;
class BlockDevice;
class CharacterDevice;
class Coredump;
class Credentials;
class Custody;
class Device;
class DiskCache;
class DoubleBuffer;
class File;
class FATInode;
class OpenFileDescription;
class DisplayConnector;
class FileSystem;
class FutexQueue;
class IPv4Socket;
class Inode;
class InodeIdentifier;
class InodeWatcher;
class Jail;
class KBuffer;
class KString;
class LocalSocket;
class Mutex;
class MasterPTY;
class Mount;
class PerformanceEventBuffer;
class ProcFS;
class ProcFSExposedComponent;
class ProcFSExposedDirectory;
class ProcFSInode;
class ProcFSProcessInformation;
class ProcFSRootDirectory;
class ProcFSSystemBoolean;
class ProcFSSystemDirectory;
class Process;
class ProcessGroup;
class RAMFS;
template<LockRank Rank>
class RecursiveSpinlock;
class Scheduler;
class Socket;
class SysFS;
class SysFSDirectory;
class SysFSRootDirectory;
class SysFSBusDirectory;
class SysFSDevicesDirectory;
class SysFSDirectoryInode;
class SysFSInode;
class TCPSocket;
class TTY;
class Thread;
class ThreadTracer;
class RAMFSInode;
class UDPSocket;
class UserOrKernelBuffer;
class VirtualFileSystem;
class WaitQueue;
class WorkQueue;
namespace Memory {
class AddressSpace;
class AnonymousVMObject;
class InodeVMObject;
class MappedROM;
class MemoryManager;
class PageDirectory;
class PhysicalPage;
class PhysicalRegion;
class PrivateInodeVMObject;
class Region;
class SharedInodeVMObject;
class VMObject;
class VirtualRange;
}
template<LockRank Rank>
class Spinlock;
template<typename LockType>
class SpinlockLocker;
struct InodeMetadata;
struct TrapFrame;
AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessID);
AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ThreadID);
AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, SessionID);
AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessGroupID);
AK_TYPEDEF_DISTINCT_ORDERED_ID(uid_t, UserID);
AK_TYPEDEF_DISTINCT_ORDERED_ID(gid_t, GroupID);
}