miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Loading...
Searching...
No Matches
block_layer.h
Go to the documentation of this file.
1#ifndef MINIOS_BLOCK_LAYER_H
2#define MINIOS_BLOCK_LAYER_H
3
4#include <miniOS/types.h>
5
15
28int block_read(uint64_t lba, uint16_t count, void *buf);
29
42int block_write(uint64_t lba, uint16_t count, const void *buf);
43
49void block_layer_init(void);
50
52
53#endif // MINIOS_BLOCK_LAYER_H
void block_layer_init(void)
Called once during kernel startup to allocate memory for the cache and prepare the block layer for us...
Definition block_layer.c:59
int block_write(uint64_t lba, uint16_t count, const void *buf)
Writes count blocks starting at lba. This is a write-through operation. The data is written to the un...
Definition block_layer.c:123
int block_read(uint64_t lba, uint16_t count, void *buf)
Reads count blocks starting at lba into buf. If count is 1, this operation will be serviced by the ca...
Definition block_layer.c:78
unsigned short uint16_t
Definition types.h:31
unsigned long int uint64_t
Definition types.h:37