PatchworkOS  3984a1d
A non-POSIX operating system.
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>
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 */
30typedef struct
31{
32 list_t dentrys; // We store all dentries in here to keep them in memory.
35
36/**
37 * @brief Registers the tmpfs filesystem and mounts an instance of it containing the boot ram disk as root.
38 */
39void tmpfs_init(void);
40
41/** @} */
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
A doubly linked list.
Definition list.h:47
A simple ticket lock implementation.
Definition lock.h:44
Superblock private data for tmpfs.
Definition tmpfs.h:31