MMgr v1.0.0
Zero-heap memory manager in C11. One borrowed buffer, carved by asserted offset.
Loading...
Searching...
No Matches
EndianNs Struct Reference

Type of an endian dispatch table. More...

#include <endian.h>

Data Fields

size_t(*) wr (const EndianCfg *args)
uint64_t(*) rd (const EndianCfg *args)
uint64_t(*) rev (const EndianCfg *args)

Detailed Description

Type of an endian dispatch table.

Note
EMBED_TABLE_LAYOUT asserts the three members sit at consecutive EMBED_FUNCTION_POINTER_BYTES offsets, with nothing else.
Two instances share this type, one per byte order. Which one a call goes through is what sets the order, and no member takes it as an argument.
wr hands back args->width as it was given. The other two return the value they produced.

Definition at line 66 of file endian.h.

Field Documentation

◆ wr

size_t(*) EndianNs::wr(const EndianCfg *args)

Writes width bytes of val to dst in the table's order.

Definition at line 68 of file endian.h.

◆ rd

uint64_t(*) EndianNs::rd(const EndianCfg *args)

Reads width bytes from src in the table's order.

Definition at line 69 of file endian.h.

◆ rev

uint64_t(*) EndianNs::rev(const EndianCfg *args)

Reverses val at width bytes.

Definition at line 70 of file endian.h.


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