TMPFS
include/fs/tmpfs.h View source View on GitHubStructs
Section titled “Structs”tmpfs_node
Section titled “tmpfs_node”struct tmpfs_node {
enum tmpfs_type type;
char *name;
void **pages;
uint64_t num_pages;
uint64_t size;
char *symlink_target;
mode_t mode;
uid_t uid;
gid_t gid;
uint64_t mtime;
uint64_t atime;
struct tmpfs_node *parent;
struct tmpfs_node **children;
uint64_t child_count;
struct mutex lock;
}; tmpfs_fs
Section titled “tmpfs_fs”struct tmpfs_fs {
struct tmpfs_node *root;
}; tmpfs_type
Section titled “tmpfs_type”enum tmpfs_type {
TMPFS_FILE,
TMPFS_DIR,
TMPFS_SYMLINK,
}; Functions
Section titled “Functions”tmpfs_mkroot
Section titled “tmpfs_mkroot”struct vfs_node * tmpfs_mkroot(const char *mount_point); Macros
Section titled “Macros”TMPFS_PAGE_SIZE
Section titled “TMPFS_PAGE_SIZE”#define TMPFS_PAGE_SIZE 4096 TMPFS_PAGE_SHIFT
Section titled “TMPFS_PAGE_SHIFT”#define TMPFS_PAGE_SHIFT 12 TMPFS_PAGE_MASK
Section titled “TMPFS_PAGE_MASK”#define TMPFS_PAGE_MASK (TMPFS_PAGE_SIZE - 1)