PatchworkOS
3984a1d
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
tmpfs.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 Temporary Filesystem.
14
* @defgroup kernel_fs_tmpfs Temporary Filesystem
15
* @ingroup kernel_fs
16
*
17
* A simple in-memory filesystem. All data is lost when power is lost.
18
*
19
* @{
20
*/
21
22
/**
23
* @brief The name of the tmpfs filesystem.
24
*/
25
#define TMPFS_NAME "tmpfs"
26
27
/**
28
* @brief Superblock private data for tmpfs.
29
*/
30
typedef
struct
31
{
32
list_t
dentrys
;
// We store all dentries in here to keep them in memory.
33
lock_t
lock
;
34
}
tmpfs_superblock_data_t
;
35
36
/**
37
* @brief Registers the tmpfs filesystem and mounts an instance of it containing the boot ram disk as root.
38
*/
39
void
tmpfs_init
(
void
);
40
41
/** @} */
boot_info.h
dentry.h
tmpfs_init
void tmpfs_init(void)
Registers the tmpfs filesystem and mounts an instance of it containing the boot ram disk as root.
Definition
tmpfs.c:379
inode.h
io.h
list.h
list_t
A doubly linked list.
Definition
list.h:47
lock_t
A simple ticket lock implementation.
Definition
lock.h:44
tmpfs_superblock_data_t
Superblock private data for tmpfs.
Definition
tmpfs.h:31
tmpfs_superblock_data_t::lock
lock_t lock
Definition
tmpfs.h:33
tmpfs_superblock_data_t::dentrys
list_t dentrys
Definition
tmpfs.h:32
superblock.h
include
kernel
fs
tmpfs.h
Generated on Sat Jan 10 2026 00:03:15 for PatchworkOS by
1.9.8