Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
ioforge_block.c File Reference
#include "ioforge/ioforge_block.h"
#include "ioforge/ioforge.h"
#include <type.h>

Go to the source code of this file.

Functions

static bool ioforge_can_contain_block_device (IoForgeType type)
 
void __attribute__ ((used, visibility("default"), section(".export")))
 This function handles memory allocation for a new dentry using the slab allocator.
 

Function Documentation

◆ __attribute__()

void __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 16 of file ioforge_block.c.

References ioforge_device::first_child, foreach_block_device_by_type(), ioforge_can_contain_block_device(), KERNEL_API, ioforge_device::next_sibling, ioforge_block_device::type, ioforge_device::type, and type.

◆ ioforge_can_contain_block_device()

static bool ioforge_can_contain_block_device ( IoForgeType type)
static

Definition at line 6 of file ioforge_block.c.

References IOFORGE_BLOCK, IOFORGE_ROOT, and type.

Referenced by __attribute__().