Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
mount.c File Reference
#include "vfs/mount.h"
#include "init/init.h"
#include "memory/slab.h"

Go to the source code of this file.

Data Structures

struct  mount_cache_node
 

Typedefs

typedef struct mount_cache_node mount_cache_node_t
 

Functions

 INIT (Mount)
 
mount_ptr_t __attribute__ ((used, visibility("default"), section(".export")))
 This function handles memory allocation for a new dentry using the slab allocator.
 

Variables

static struct slab_cachemount_cache
 

Typedef Documentation

◆ mount_cache_node_t

Function Documentation

◆ __attribute__()

mount_ptr_t __attribute__ ( (used, visibility("default"), section(".export")) )

This function handles memory allocation for a new dentry using the slab allocator.

It also links the dentry to its corresponding VNode (if provided).

Note
This function performs lazy initialization of the dentry slab cache if it does not exist yet.
Parameters
nameThe name of the file or directory.
vnodePointer to the associated VNode (inode data). Pass NULL if the VNode is not yet available.
Returns
dentry_ptr A pointer to the newly allocated and initialized dentry.

Definition at line 15 of file mount.c.

References KERNEL_API, mount_cache, and vxSlabAlloc().

◆ INIT()

INIT ( Mount )

Definition at line 11 of file mount.c.

References mount_cache, and vxCreateSlabCache().

Variable Documentation

◆ mount_cache

struct slab_cache* mount_cache
static

Definition at line 5 of file mount.c.

Referenced by __attribute__(), and INIT().