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

Caller-owned private state for a caching block device. More...

#include <ra8_io_blockdev_cache.h>

Collaboration diagram for ra8_io_blockdev_cache_state_t:

Data Fields

const ra8_io_blockdev_tunder
 Wrapped backend (private).
uint8_t * data
 n_slots * 512 cache bytes.
ra8_io_blockdev_cache_slot_tslots
 n_slots metadata entries.
uint32_t n_slots
 Number of cached sectors.
uint32_t clock
 Monotonic LRU access counter.
uint32_t hits
 Read cache hits so far.
uint32_t misses
 Read cache misses so far.

Detailed Description

Caller-owned private state for a caching block device.

Zero-initialise and pass to ra8_io_blockdev_cache_init. The underlying device, data buffer, and slot array must out-live it.

Invariant
clock increases monotonically across accesses.
Since
0.1.0

Definition at line 77 of file ra8_io_blockdev_cache.h.

Field Documentation

◆ clock

uint32_t ra8_io_blockdev_cache_state_t::clock

Monotonic LRU access counter.

Definition at line 82 of file ra8_io_blockdev_cache.h.

Referenced by internal_cache_read_block(), internal_cache_state_init(), and internal_cache_write_block().

◆ data

uint8_t* ra8_io_blockdev_cache_state_t::data

◆ hits

uint32_t ra8_io_blockdev_cache_state_t::hits

Read cache hits so far.

Definition at line 83 of file ra8_io_blockdev_cache.h.

Referenced by internal_cache_read_block(), internal_cache_state_init(), and ra8_io_blockdev_cache_stats().

◆ misses

uint32_t ra8_io_blockdev_cache_state_t::misses

Read cache misses so far.

Definition at line 84 of file ra8_io_blockdev_cache.h.

Referenced by internal_cache_read_block(), internal_cache_state_init(), and ra8_io_blockdev_cache_stats().

◆ n_slots

uint32_t ra8_io_blockdev_cache_state_t::n_slots

◆ slots

◆ under

const ra8_io_blockdev_t* ra8_io_blockdev_cache_state_t::under

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