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

Row-wise view of the vtable, for the completeness scan. More...

Data Fields

hosted_osi_funcs_t table
 The table as the vendored core sees it.
void(*[sizeof(hosted_osi_funcs_t)/sizeof(void(*)(void))]) rows (void)
 The same bytes as a flat array of rows.

Detailed Description

Row-wise view of the vtable, for the completeness scan.

Reading a structure of function pointers through an array of function pointers is only defined through a union, so the scan uses one. The accompanying static assertion is what makes the view safe: it fails the build if the vendored table ever gains a member that is not a function pointer, rather than letting the scan silently misread it.

Invariant
Both members are exactly the same size.
Every member of the table is a function pointer.
Example:
ra8_esp_hosted_osi_view_t view = { .table = *table };
union ra8_esp_hosted_osi_view ra8_esp_hosted_osi_view_t
hosted_osi_funcs_t table
The table as the vendored core sees it.
See also
priv_ra8_esp_hosted_osi_is_complete
Since
0.1.0

Definition at line 452 of file ra8_esp_hosted_osi.c.

Field Documentation

◆ rows

void(*[sizeof(hosted_osi_funcs_t)/sizeof(void(*)(void))]) ra8_esp_hosted_osi_view::rows(void)

The same bytes as a flat array of rows.

Definition at line 455 of file ra8_esp_hosted_osi.c.

Referenced by priv_ra8_esp_hosted_osi_is_complete().

◆ table

hosted_osi_funcs_t ra8_esp_hosted_osi_view::table

The table as the vendored core sees it.

Definition at line 453 of file ra8_esp_hosted_osi.c.


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