Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
string.c File Reference
#include <memory/kalloc.h>
#include <str.h>
#include <string.h>
#include <type.h>

Go to the source code of this file.

Functions

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

Function Documentation

◆ __attribute__()

__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 6 of file string.c.

References kstring::c_str, kstring::cap, kalloc(), KERNEL_API, kfree(), kstring::len, len, memcopy(), NULL, and strlen().