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

Everything one context schedules over. More...

#include <praet_ordo.h>

Data Fields

uint32_t flags [PRAET_CHANNELS]
embed_word keepalive_deadline [PRAET_CHANNELS]
embed_word settle_deadline
volatile embed_word praet_set_bitflag
volatile embed_word praet_busy_bitflag
embed_word elapsed_micros

Detailed Description

Everything one context schedules over.

Parameters
flagsOne uint32 per channel: quaternary core at the bottom, statuses above it, region descriptor in the byte at PRAET_REGION_SHIFT. Plain, because the two volatiles below are what coordinate against the interrupt. Fixed at 32 bits whatever embed_word is, because the layout is a fixed set of bits and an environment building at a 16-bit word has nowhere to put the region byte.
boundFirst byte of the memory each attached channel moves, as the pool named at its attach [BORROWS]. Present only where PRAET_RECOVERY is on.
bound_bytesHow many bytes are at that address, as the pool's own extent said. Present only where PRAET_RECOVERY is on.
startFirst byte of each running channel's transfer, which is bound plus the offset a submit named. The caller's storage, and the caller's to write - nothing here writes through it [BORROWS]. Present only where PRAET_RECOVERY is on.
lengthBytes each running channel was asked to move. Present only where PRAET_RECOVERY is on.
positionBytes each running channel has moved, as of its last kick. Present only where PRAET_RECOVERY is on.
boundary_crcChecksum of the word a recovery found the engine inside, where the declaration asked for the check. Meaningful only where the channel reads PRAET_MEASURED.
word_boundary_crcWhat the declaration answered about the boundary word check. Written once by PraetOrdoContext and never again, as lets the one branch reading it fold away where the answer was no.
keepalive_deadlineMicrosecond mark each running channel must be kicked before.
settle_deadlineMicrosecond mark the engine finishes settling at. One timer, because settling is the engine coming up and not a property of a channel.
praet_set_bitflagRaised by the interrupt, and by anything that changes what a service call would find. Volatile, and so it is not cached across the preemption.
praet_busy_bitflagThe reader/setter's lock. Volatile, and set while it updates, and that makes it ignore the interrupt for that span.
elapsed_microsMicroseconds elapsed, as the caller advances them.
Note
Both volatiles carry the module prefix. set and busy are words a caller is entitled to have taken for a macro of their own, and a macro over a member name breaks the struct at every use with a diagnostic that points nowhere near the cause.
Warning
The context sits at an address the linker resolves and is written by offset from it. Nothing computes where a member lives, and it cannot be relocated or copied - its address is its identity.

Definition at line 269 of file praet_ordo.h.

Field Documentation

◆ flags

uint32_t PraetOrdo::flags[PRAET_CHANNELS]

Definition at line 271 of file praet_ordo.h.

◆ keepalive_deadline

embed_word PraetOrdo::keepalive_deadline[PRAET_CHANNELS]

Definition at line 272 of file praet_ordo.h.

◆ settle_deadline

embed_word PraetOrdo::settle_deadline

Definition at line 282 of file praet_ordo.h.

◆ praet_set_bitflag

volatile embed_word PraetOrdo::praet_set_bitflag

Definition at line 283 of file praet_ordo.h.

◆ praet_busy_bitflag

volatile embed_word PraetOrdo::praet_busy_bitflag

Definition at line 284 of file praet_ordo.h.

◆ elapsed_micros

embed_word PraetOrdo::elapsed_micros

Definition at line 285 of file praet_ordo.h.


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