|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include "vfs/dev.h"#include <hash.h>#include <libk/serial.h>#include <memory/memory_utils.h>#include <memory/phys_base_allocator.h>#include <memory/slab.h>#include <str.h>#include <type.h>Go to the source code of this file.
Data Structures | |
| struct | minor_map |
Functions | |
| static int32_t | alloc_minor (uint32_t major) |
| __attribute__ ((used, visibility("default"), section(".export"))) | |
| This function handles memory allocation for a new dentry using the slab allocator. | |
Variables | |
| static cdev_ptr_t | dev_chain = 0 |
| static struct slab_cache * | block_device_cache = 0 |
| static struct minor_map | major_map [256] = {0} |
| __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).
| name | The name of the file or directory. |
| vnode | Pointer to the associated VNode (inode data). Pass NULL if the VNode is not yet available. |
Definition at line 62 of file dev.c.
References alloc_minor(), block_device_cache, dev_chain, KERNEL_API, cdev::major, major, cdev::minor, minor, cdev::ops, ops, slab_free(), vxCreateSlabCache(), and vxSlabAlloc().
Definition at line 39 of file dev.c.
References DEV_MINOR_BITMAP_COUNT, major, and major_map.
Referenced by __attribute__().
|
static |
Definition at line 31 of file dev.c.
Referenced by __attribute__().
|
static |
Definition at line 30 of file dev.c.
Referenced by __attribute__().
|
static |
Definition at line 37 of file dev.c.
Referenced by alloc_minor().