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

Bounded worklist of directories still to walk (NASA P10 Rule 1). More...

Collaboration diagram for fat_dir_stack_t:

Data Fields

dir_loc_t items [k_ra8_fs_check_max_dirs]
 The pending directory locations.
uint32_t top
 Count of pending entries.
uint8_t truncated
 1 once an overflow was dropped.

Detailed Description

Bounded worklist of directories still to walk (NASA P10 Rule 1).

A stack of directory locations rather than recursion. Pushing past k_ra8_fs_check_max_dirs sets truncated – recorded once as k_ra8_fs_check_fault_scan_truncated – and drops the entry, so a pathologically deep or wide tree bounds the scan instead of overflowing the C stack.

Invariant
top <= k_ra8_fs_check_max_dirs.
Since
0.1.0

Definition at line 97 of file ra8_fs_fat_check.c.

Field Documentation

◆ items

dir_loc_t fat_dir_stack_t::items[k_ra8_fs_check_max_dirs]

The pending directory locations.

Definition at line 98 of file ra8_fs_fat_check.c.

Referenced by internal_fat_push(), and internal_fat_tree().

◆ top

uint32_t fat_dir_stack_t::top

Count of pending entries.

Definition at line 99 of file ra8_fs_fat_check.c.

Referenced by internal_fat_push(), and internal_fat_tree().

◆ truncated

uint8_t fat_dir_stack_t::truncated

1 once an overflow was dropped.

Definition at line 100 of file ra8_fs_fat_check.c.

Referenced by internal_fat_push().


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