ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_io_blockdev_cache_slot_t Struct Reference

Per-sector cache metadata (one caller-owned array entry per slot). More...

#include <ra8_io_blockdev_cache.h>

Data Fields

uint32_t lba
 Cached logical block address (valid only if in use).
uint32_t last_use
 LRU stamp; larger == more recently used.
bool valid
 true => this slot holds a cached sector.

Detailed Description

Per-sector cache metadata (one caller-owned array entry per slot).

Treat as private; the cache owns the contents. Allocate an array of n_slots of these alongside an n_slots * 512-byte data buffer.

Since
0.1.0

Definition at line 60 of file ra8_io_blockdev_cache.h.

Field Documentation

◆ last_use

uint32_t ra8_io_blockdev_cache_slot_t::last_use

LRU stamp; larger == more recently used.

Definition at line 62 of file ra8_io_blockdev_cache.h.

Referenced by internal_cache_pick_victim(), internal_cache_read_block(), internal_cache_reset_slots(), and internal_cache_write_block().

◆ lba

uint32_t ra8_io_blockdev_cache_slot_t::lba

Cached logical block address (valid only if in use).

Definition at line 61 of file ra8_io_blockdev_cache.h.

Referenced by internal_cache_erase(), internal_cache_find(), internal_cache_read_block(), internal_cache_reset_slots(), and internal_cache_write_block().

◆ valid

bool ra8_io_blockdev_cache_slot_t::valid

The documentation for this struct was generated from the following file: