The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
block_cache.c File Reference
#include "block_cache.h"
#include "common/memory.h"
#include "kernel/memory/heap.h"

Functions

kerr_t block_cache_init (block_cache_t *cache, block_device_t *backing)
 put a cache in front of a device with 512-byte sectors.

Variables

block_cache_t * block_cache_root
 the cache that serves the root filesystem, for /proc/meminfo (NULL before it is set up).

Function Documentation

◆ block_cache_init()

kerr_t block_cache_init ( block_cache_t * cache,
block_device_t * backing )

put a cache in front of a device with 512-byte sectors.

Parameters
cachethe cache (lives as long as the device is used).
backingthe device to cache.
Returns
KERR_OK, KERR_INVAL for another sector size, or KERR_NOMEM.

Variable Documentation

◆ block_cache_root

block_cache_t* block_cache_root

the cache that serves the root filesystem, for /proc/meminfo (NULL before it is set up).