Voxia OS
v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
ioforge_block.hpp
Go to the documentation of this file.
1
#ifndef __IOFORGE__IOFORGE_BLOCK_HPP__
2
#define __IOFORGE__IOFORGE_BLOCK_HPP__
3
4
#include "
block/block.h
"
5
#include "
ioforge/ioforge.hpp
"
6
#include "
ioforge/ioforge_block.h
"
7
8
class
IOForgeBlock
:
public
IOForge
{
9
public
:
10
inline
IOForgeBlock
(
const
char
*
mod
) :
IOForge
(
mod
) {}
11
static
void
create
(
const
char
*
name
, block_device_operations_t*
ops
,
12
void
*
identifier
);
13
14
template
<
typename
T>
15
void
foreach_by_type
(
ioforge_device
* node,
uint8_t
type
, T&& callback) {
16
foreach_block_device_by_type
(
17
node,
type
,
18
[](
ioforge_block_device
* dev,
void
* ctx) {
19
(*
reinterpret_cast<
T*
>
(ctx))(dev);
20
},
21
&callback);
22
}
23
24
virtual
void
load
() = 0;
25
virtual
void
unload
() = 0;
26
};
27
28
#endif
// __IOFORGE__IOFORGE_BLOCK_HPP__
block.h
IOForgeBlock::foreach_by_type
void foreach_by_type(ioforge_device *node, uint8_t type, T &&callback)
Definition
ioforge_block.hpp:15
IOForgeBlock::IOForgeBlock
IOForgeBlock(const char *mod)
Definition
ioforge_block.hpp:10
IOForgeBlock::unload
virtual void unload()=0
IOForgeBlock::load
virtual void load()=0
IOForgeBlock::create
static void create(const char *name, block_device_operations_t *ops, void *identifier)
IOForge::IOForge
IOForge(const char *mod)
Definition
ioforge.hpp:18
IOForge::mod
const char * mod
Definition
ioforge.hpp:65
name
kstring name
Definition
dentry.h:5
ops
void * ops
Definition
dev.h:2
ioforge.hpp
ioforge_block.h
foreach_block_device_by_type
void foreach_block_device_by_type(struct ioforge_device *node, uint8_t type, ioforge_block_visitor_fn callback, void *ctx)
identifier
uint16_t identifier
Definition
icmp.h:4
ioforge_block_device
Definition
ioforge_block.h:60
ioforge_device
Definition
ioforge.h:29
uint8_t
unsigned char uint8_t
Definition
type.h:7
type
uint8_t type
Definition
vnode.h:2
include
ioforge
ioforge_block.hpp
Generated on Sat May 30 2026 11:09:57 for Voxia OS by
1.13.2