PatchworkOS
966e257
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
ramfs.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
kernel/fs/dentry.h
>
4
#include <
kernel/fs/inode.h
>
5
#include <
kernel/fs/superblock.h
>
6
7
#include <
boot/boot_info.h
>
8
9
#include <
sys/io.h
>
10
#include <
sys/list.h
>
11
12
/**
13
* @brief RAM filesystem.
14
* @defgroup kernel_fs_ramfs RAMFS
15
* @ingroup kernel_fs
16
*
17
* A simple in-memory filesystem thats loaded from the bootloader. All data is lost when the system is powered off or
18
* rebooted.
19
*
20
* @{
21
*/
22
23
/**
24
* @brief The name of the ramfs filesystem.
25
*/
26
#define RAMFS_NAME "ramfs"
27
28
/**
29
* @brief Superblock private data for ramfs.
30
*/
31
typedef
struct
32
{
33
list_t
dentrys
;
// We store all dentries in here to keep them in memory.
34
lock_t
lock
;
35
}
ramfs_superblock_data_t
;
36
37
/**
38
* @brief Registers the ramfs filesystem and mounts it as the root filesystem.
39
*/
40
void
ramfs_init
(
void
);
41
42
/** @} */
boot_info.h
dentry.h
ramfs_init
void ramfs_init(void)
Registers the ramfs filesystem and mounts it as the root filesystem.
Definition
ramfs.c:327
inode.h
io.h
list.h
list_t
A doubly linked list.
Definition
list.h:49
lock_t
A simple ticket lock implementation.
Definition
lock.h:43
ramfs_superblock_data_t
Superblock private data for ramfs.
Definition
ramfs.h:32
ramfs_superblock_data_t::lock
lock_t lock
Definition
ramfs.h:34
ramfs_superblock_data_t::dentrys
list_t dentrys
Definition
ramfs.h:33
superblock.h
include
kernel
fs
ramfs.h
Generated on Mon Dec 15 2025 21:55:53 for PatchworkOS by
1.9.8