Data Structures | |
| struct | CellOwner |
| Asserts MMGR_CARCER_ALIGN is a power of two. More... | |
| struct | SeriesCellularum |
| One cellblock's state: its bytes, the two boundaries that grow toward each other, and the closed word a writer holds. Also the sink a refused store lands on, and the turnstiles every pass goes through. More... | |
| struct | CarcerMovableInitCfg |
| What a program gives a cellblock for the movable option, once, through its guard's movable_init. More... | |
| struct | CarcerMovableCfg |
| Arguments for the calls that reach a movable cell's bytes, each of which reads the members it names. More... | |
| struct | MinimumSecurityGuard |
| The minimum security guard over one cellblock: a released cell retains whatever is in it. More... | |
| struct | MaxSecurityGuard |
| The max security guard over one cellblock: every release zeroes the cell first. More... | |
Macros | |
| #define | MMGR_ENABLE_HW_MEM_CAPACITY_CB |
| Set to 1 to track each tier's high-water mark. | |
| #define | MMGR_CARCER_OWNERS |
| The max owners a program's owner table holds. | |
| #define | MMGR_MOVABLE_SETTLE_PERCENT |
| The fragmentation at which a cellblock's mover sorts its movable cells, as a percentage of the bytes its persistent tier occupies. | |
| #define | MMGR_MOVABLE_READ_MS |
| The milliseconds between the mover's readings of its cellblock. | |
| #define | MMGR_MOVABLE_QUIET_READINGS |
| The readings in a row that must find the cellblock quiet before the mover sorts. | |
| #define | MMGR_MOVABLE_BACKOFF_MAX_MS |
| The longest the mover waits between readings after a sort it backed off from. | |
| #define | MMGR_MOVABLE_IDLE_MAX_MS |
| The longest the mover waits between readings of a settled cellblock that no pass touched since the last reading. Each such reading doubles the wait up to this. A pass or a rise brings the next reading back to MMGR_MOVABLE_READ_MS. | |
| #define | MMGR_CARCER_REGIONS |
| The regions of the temporary tier: one stack of cells for each place the host gives a thread, modulo this count. 0 makes the temporary tier one stack that every thread shares. | |
| #define | MMGR_CARCER_REGION_BYTES |
| Bytes of each region: its cells with their headers and owner words. A multiple of MMGR_CARCER_ALIGN. | |
| #define | MMGR_CARCER_LARGE_REGION_BYTES |
| Bytes of the one large region, at the top of the cellblock, that every temporary take over a region's room goes to, from any thread. 0 refuses such a take. | |
| #define | MMGR_CARCER_LARGE_REGIONS |
| 1 where the cellblock has the large region, 0 where it has none. | |
| #define | MMGR_CARCER_REGION_COUNT |
| The regions in all: one for each place, and the large one where the build declares it. | |
| #define | MMGR_CARCER_REGION_AREA |
| Bytes the regions take off the top of every cellblock, 0 where the temporary tier is one stack. | |
| #define | MMGR_CARCER_ALIGN |
| Alignment of every prisoner on the way out: one machine word, or the atomic size word's alignment where that is wider. | |
| #define | MMGR_OWNER_PLACE_BITS |
| The owner word a cell carries behind its payload, one machine word positioned as fields, high to low. The fields are the owner's place in the table, the completion bit, the signal bits, and the nanosecond of the take. The clock is the library's, and the nanosecond rolls over its bits. | |
| #define | MMGR_OWNER_SIGNAL_BITS |
| #define | MMGR_OWNER_TIME_BITS |
| #define | MMGR_OWNER_TIME_MASK |
| #define | MMGR_OWNER_SIGNAL_SHIFT |
| #define | MMGR_OWNER_COMPLETE |
| #define | MMGR_OWNER_PLACE_SHIFT |
| #define | MMGR_OWNER_PLACE_MASK |
| #define | MMGR_OWNER_PLACE(name_, text_) |
| One owner's place in the table, counted from 0, as the enumeration MMGR_OWNERS positions names it. | |
| #define | MMGR_OWNER_RECORD(name_, text_) |
| One owner's record as the table's initializer positions it: its name, its place from 1, nothing counted. | |
| #define | MMGR_OWNER_POINTER(name_, text_) |
| One owner's identity defined: a const pointer to its record in the table, resolved by the linker. | |
| #define | MMGR_OWNER_EXTERN(name_, text_) |
| One owner's identity declared, for the header the owner's module reads it through. | |
| #define | MMGR_OWNERS(list_) |
| The program's owners declared as data: the table positioned, its count, and each owner's identity defined. | |
| #define | MMGR_CARCER_HALF_BITS |
| The bits each boundary has in the word that carries both, half the atomic size word, and the mask of a half. | |
| #define | MMGR_CARCER_HALF_MASK |
| #define | MMGR_CARCER_BYTES_MAX |
| The reach of a position in a boundary half: half the half's values. The other half is the headroom the bumps a round refuses move the position into before the next writer settles it. | |
| #define | MMGR_CARCER_WANT_MAX |
| The max payload one bump may ask. It is the headroom the bumps in flight on the turnstiles' lanes share. Each of them may move its boundary once past MMGR_CARCER_BYTES_MAX before the refusal stops the rest. A take past it goes to the writer's path at once. | |
| #define | MMGR_CARCER_BANK_SHIFT |
| The bits of a bank's bytes: a bank is half the reach of a position. A test build can set fewer, so that a small pool spans many banks. | |
| #define | MMGR_CARCER_BANK_BYTES |
| The bytes of one bank. | |
| #define | MMGR_CARCER_BANK_FIELD_BITS |
| The bits of each field of the closed word above its four flag bits. The fields are the bank count, the frame of the persistent tier and the frame of the temporary tier, in that order. | |
| #define | MMGR_CARCER_BANK_FIELD_MASK |
| The mask of one field, at bit 0. | |
| #define | MMGR_CARCER_BANK_COUNT_AT |
| The bit of the closed word that each field starts at. | |
| #define | MMGR_CARCER_BANK_END_AT |
| #define | MMGR_CARCER_BANK_TOP_AT |
| #define | MMGR_CARCER_POOL_BYTES_MAX |
| The max bytes one cellblock may hold: one less than the values of a field, times the bytes of a bank. So every frame and the bank count fit their fields. | |
| #define | MMGR_CARCER_BANK_OF(off_) |
| The bank an offset is in. | |
| #define | MMGR_CARCER_BANK_COUNT(bytes_) |
| The banks a cellblock of bytes_ bytes takes: its bytes rounded up to a whole bank. | |
| #define | MMGR_CARCER_FRAME_CAP(bytes_) |
| The highest frame of a cellblock of bytes_ bytes: two banks below its bank count, or bank 0. | |
| #define | MMGR_CARCER_END_FRAME(end_, bytes_) |
| The frame a writer gives a persistent end in a cellblock of bytes_ bytes: the end's bank, or the cap. | |
| #define | MMGR_CARCER_BANK_BELOW(top_) |
| The bank below a top's own bank, or bank 0. | |
| #define | MMGR_CARCER_TOP_FRAME(top_, bytes_) |
| The frame a writer gives a temporary top in a cellblock of bytes_ bytes: the bank below the top's own, or the cap. | |
| #define | MMGR_CARCER_CLOSED_AT_REST(bytes_) |
| The closed word of a cellblock at rest over bytes_ bytes. It holds no flag, the bank count, the persistent frame at bank 0, and the temporary frame for the top at the regions' start. | |
| #define | MMGR_CARCER_BOUNDS_AT_REST(bytes_) |
| The boundary word of a cellblock at rest over bytes_ bytes: the end at 0, the top's position in its frame. | |
| #define | MMGR_CARCER_STATE_HW |
| The high-water members' first values, or nothing where the build tracks none. | |
| #define | MMGR_CARCER_STATE_REGIONS |
| The regions' first depths, every one 0, or nothing where the temporary tier is one stack. | |
| #define | MMGR_CARCER_STATE_TURNSTILES |
| The turnstiles' first values: each lane word, the top open lane and the queue length at 0. | |
| #define | MMGR_CARCER_STATE(base_, bytes_) |
| A cellblock's state as it is over bytes_ bytes at base_ with no cell taken. Both tiers are empty, every mark is at zero, and the zero fill of the storage covers the turnstiles. | |
| #define | MMGR_CARCER_STATE_HOSPES |
| The record of a cellblock over a hospes pool before the program places it: no base, no size, both boundaries at 0, so every take is refused until mmgr_series_cellularum_placed gives the storage. | |
| #define | MMGR_MOVABLE_HEAD_BYTES |
| Bytes of the option's state ahead of its turnstiles, which locus_carcerum.c asserts it fits. | |
| #define | MMGR_MOVABLE_CLAIM_BITS |
| The bits of one word of the option's claim bits: one an entry. | |
| #define | MMGR_MOVABLE_STORAGE_BYTES(cells_, width_, rows_) |
| The storage the movable option takes for a table of cells_ entries and rows_ rows of touches. | |
| #define | MMGR_GUARD_MOVABLE_TAKE_MEMBERS |
| The two movable members both guards hold ahead of their movable release. | |
| #define | MMGR_GUARD_MOVABLE_SPAN_MEMBERS |
| The four movable members both guards hold after their movable release. | |
| #define | MMGR_GUARD_MEMBER_NAMES |
| The thirteen member names of both guards, in their order, for EMBED_TABLE_LAYOUT. | |
| #define | MMGR_CARCER_MOVABLE_ENTRIES(prisonsite_, name_, wipe_to_zero_on_release_, series_cellularum_) |
| The movable entries of one cellblock, bound to it through series_cellularum_. | |
| #define | MMGR_CARCER_BODY(prisonsite_, type_, name_, wipe_to_zero_on_release_, hospes_) |
| Everything one cellblock is: its bytes, its state, and the entries bound to it. | |
| #define | MMGR_CARCER_STORAGE_0(prisonsite_, name_) |
| A cellblock's record over the array its pool's declaration emitted: the asserts on the array's extent, and the record with the array as its base and the pool's count as its size. | |
| #define | MMGR_CARCER_STORAGE_1(prisonsite_, name_) |
| A cellblock's record over a hospes pool: empty until the program places it. | |
| #define | MMGR_CARCER_MEM(prisonsite_, type_, name_, wipe_to_zero_on_release_, hospes_) |
| One cellblock as a member of its site's type. | |
| #define | MMGR_CARCER_SEAT(prisonsite_, type_, name_, wipe_to_zero_on_release_, hospes_) |
| One cellblock's entries, in the order its guard declares them. | |
| #define | MMGR_MINIMUM_SECURITY(name_) |
| Declares a minimum security cellblock over a pool. | |
| #define | MMGR_MAXIMUM_SECURITY(name_) |
| Declares a max security cellblock over a pool. | |
| #define | MMGR_MINIMUM_SECURITY_HOSPES(name_) |
| Declares a minimum security cellblock over a hospes pool, one ParsMemoriaeHospes declared: the program gives the storage once, with mmgr_series_cellularum_placed, before the first take. | |
| #define | MMGR_MAXIMUM_SECURITY_HOSPES(name_) |
| Declares a max security cellblock over a hospes pool, as MMGR_MINIMUM_SECURITY_HOSPES with the wipe on release. | |
| #define | MMGR_UNTUPLE(...) |
| Strips a tuple's parentheses. | |
| #define | MMGR_CARCER_APPLY(what_, prisonsite_, tuple_) |
| Applies one reader to one cellblock tuple, with the site spliced in ahead of it. | |
| #define | MMGR_CARCER_APPLY_(what_, prisonsite_, ...) |
| Expands to what_(prisonsite_, VA_ARGS). | |
| #define | MMGR_CARCER_W1(what_, prisonsite_, SeriesCellularum1_) |
| Applies the reader to a site's one cellblock tuple. | |
| #define | MMGR_CARCER_W2(what_, prisonsite_, SeriesCellularum1_, SeriesCellularum2_) |
| Applies the reader to a site's two cellblock tuples. | |
| #define | MMGR_CARCER_W3(what_, prisonsite_, SeriesCellularum1_, SeriesCellularum2_, SeriesCellularum3_) |
| Applies the reader to a site's three cellblock tuples. | |
| #define | MMGR_CARCER_W4(what_, prisonsite_, SeriesCellularum1_, SeriesCellularum2_, SeriesCellularum3_, SeriesCellularum4_) |
| Applies the reader to a site's four cellblock tuples. | |
| #define | MMGR_CARCER_W5(what_, prisonsite_, SeriesCellularum1_, SeriesCellularum2_, SeriesCellularum3_, SeriesCellularum4_, SeriesCellularum5_) |
| Applies the reader to a site's five cellblock tuples. | |
| #define | MMGR_CARCER_W6(what_, prisonsite_, SeriesCellularum1_, SeriesCellularum2_, SeriesCellularum3_, SeriesCellularum4_, SeriesCellularum5_, SeriesCellularum6_) |
| Applies the reader to a site's six cellblock tuples. | |
| #define | MMGR_CARCER_W7(what_, prisonsite_, SeriesCellularum1_, SeriesCellularum2_, SeriesCellularum3_, SeriesCellularum4_, SeriesCellularum5_, SeriesCellularum6_, SeriesCellularum7_) |
| Applies the reader to a site's seven cellblock tuples. | |
| #define | MMGR_CARCER_W8(what_, prisonsite_, SeriesCellularum1_, SeriesCellularum2_, SeriesCellularum3_, SeriesCellularum4_, SeriesCellularum5_, SeriesCellularum6_, SeriesCellularum7_, SeriesCellularum8_) |
| Applies the reader to a site's eight cellblock tuples. | |
| #define | MMGR_CARCER_WALK(what_, prisonsite_, ...) |
| Expands the walk that matches the cellblock count. | |
| #define | LocusCarcerum(prisonsite_, ...) |
| Declares a prison site and the cellblocks built at it. | |
Typedefs | |
| typedef struct CarcerMovableEntry | CarcerMovableEntry |
| The identity a movable cell's taker holds: a const pointer to the cell's entry in the cellblock's translation table. | |
| typedef void(*) | CarcerIdleEach(void *context, void *at, size_t bytes) |
| A span of a cellblock's storage no cell holds, passed to the program: where it starts and its bytes. | |
Functions | |
| EMBED_HOST_DEVICE uint64_t | mmgr_carcer_hw_clock_ns (void) |
| The library's clock in nanoseconds, which a cell's owner word carries the take on. | |
| EMBED_PASS_DECLARE (CellOwner, mmgr_owner_table, []) | |
| The program's owner table and the owners in it, which MMGR_OWNERS defines once. | |
| EMBED_PASS_DECLARE (const size_t, mmgr_owner_table_count,) | |
| EMBED_HOST_DEVICE embed_bool | mmgr_owner_listed (const CellOwner *owner) |
| Whether an owner is one of the table's. | |
| static EMBED_HOST_DEVICE size_t | mmgr_owner_in_use (const CellOwner *owner) |
| The payload bytes of the cells an owner has now. | |
| static EMBED_HOST_DEVICE size_t | mmgr_owner_hw (const CellOwner *owner) |
| The max payload bytes an owner has had at once. | |
| EMBED_HOST_DEVICE void | mmgr_carcer_hw_misnamed (const CellOwner *named, const CellOwner *cell_owner, size_t bytes) |
| Told of each give or growth that names an owner other than the one the cell counts to. | |
| EMBED_HOST_DEVICE size_t | mmgr_series_cellularum_persistent_end (const SeriesCellularum *series) |
| Offset just past the last persistent cell. | |
| EMBED_HOST_DEVICE size_t | mmgr_series_cellularum_temporary_top (const SeriesCellularum *series) |
| Offset of the lowest temporary cell. | |
| static EMBED_HOST_DEVICE size_t | mmgr_series_cellularum_banks (const SeriesCellularum *series) |
| The banks a cellblock's bytes take, as its closed word holds the count. | |
| static EMBED_HOST_DEVICE size_t | mmgr_series_cellularum_region_depth (const SeriesCellularum *series, size_t region) |
| The bytes one region's stack holds from its end down. | |
| static EMBED_HOST_DEVICE embed_bool | mmgr_series_cellularum_regions_idle (const SeriesCellularum *series) |
| Whether every region is empty. | |
| static EMBED_HOST_DEVICE embed_bool | mmgr_series_cellularum_idle (const SeriesCellularum *series) |
| Whether a cellblock has no cell out. | |
| static EMBED_HOST_DEVICE size_t | mmgr_series_cellularum_persistent_hw (const SeriesCellularum *series) |
| The furthest point of a cellblock's persistent tier so far. | |
| static EMBED_HOST_DEVICE size_t | mmgr_series_cellularum_temporary_hw (const SeriesCellularum *series) |
| The max bytes a cellblock's temporary tier took from the top at one time. | |
| EMBED_HOST_DEVICE void * | mmgr_persistent_buf_alloc (SeriesCellularum *series, size_t size, const CellOwner *owner) |
| Takes size bytes from a cellblock's persistent tier. | |
| EMBED_HOST_DEVICE void * | mmgr_persistent_max_security_buf_alloc (SeriesCellularum *series, size_t size, const CellOwner *owner) |
| Takes size bytes from a max security cellblock's persistent tier. | |
| EMBED_HOST_DEVICE void | mmgr_persistent_buf_release (SeriesCellularum *series, void *prisoner, const CellOwner *owner) |
| Releases a prisoner and leaves the cell's bytes as they are. | |
| EMBED_HOST_DEVICE void | mmgr_persistent_max_security_buf_release (SeriesCellularum *series, void *prisoner, const CellOwner *owner) |
| Zeroes a cell, then releases the prisoner. | |
| EMBED_HOST_DEVICE void * | mmgr_buf_grow (SeriesCellularum *series, void *prisoner, size_t size, const CellOwner *owner) |
| Grows a cell to size payload bytes in place, where it is the newest cell of its tier. | |
| EMBED_HOST_DEVICE void * | mmgr_max_security_buf_grow (SeriesCellularum *series, void *prisoner, size_t size, const CellOwner *owner) |
| Grows a cell in place as mmgr_buf_grow does, and zeroes the bytes the growth adds. | |
| EMBED_HOST_DEVICE void * | mmgr_temporary_buf_alloc (SeriesCellularum *series, size_t size, const CellOwner *owner) |
| Takes size bytes from a cellblock's temporary tier. | |
| EMBED_HOST_DEVICE void * | mmgr_temporary_max_security_buf_alloc (SeriesCellularum *series, size_t size, const CellOwner *owner) |
| Takes size bytes from a max security cellblock's temporary tier. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_who_owns_buf (const SeriesCellularum *series, const void *at) |
| Whether at lies inside the cellblock's bytes. | |
| EMBED_HOST_DEVICE const CellOwner * | mmgr_owner_of_buf (const SeriesCellularum *series, const void *prisoner) |
| The owner a cell counts to, read off the word behind its payload. | |
| EMBED_HOST_DEVICE size_t | mmgr_buf_available (SeriesCellularum *series) |
| The bytes between the two tiers. | |
| EMBED_HOST_DEVICE void | mmgr_zero_buf (void *prisoner, size_t size) |
| Zeroes size bytes at prisoner and releases nothing. | |
| EMBED_HOST_DEVICE size_t | mmgr_align_up_buf (size_t size) |
| Rounds size up to a whole machine word. | |
| EMBED_HOST_DEVICE void | mmgr_series_cellularum_emptied (SeriesCellularum *series) |
| Puts a cellblock back to the state of its declaration. Both tiers are empty, the closed word and the turnstiles at rest, the option unassigned, and no byte of its storage touched. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_series_cellularum_placed (SeriesCellularum *series, uint8_t *storage, size_t bytes) |
| Places a cellblock declared over a hospes pool on the storage the program gives: its base and its size set, and the cellblock emptied over them. | |
| EMBED_HOST_DEVICE void | mmgr_series_cellularum_idle_each (SeriesCellularum *series, CarcerIdleEach each, void *context) |
| Passes each span of the cellblock's storage that no cell holds to each, with the cellblock closed: the gap between the tiers, and the room of each region above its depth. | |
| EMBED_HOST_DEVICE void | mmgr_owner_bytes_taken (const CellOwner *owner, size_t bytes) |
| Counts bytes that lie in no cellblock to an owner, as a ring's or a page's are. | |
| EMBED_HOST_DEVICE void | mmgr_owner_bytes_given (const CellOwner *owner, size_t bytes) |
| Takes bytes mmgr_owner_bytes_taken counted off their owner. | |
| EMBED_HOST_DEVICE size_t | mmgr_series_cellularum_fragmentation (const SeriesCellularum *series) |
| A cellblock's fragmentation: the bytes its persistent tier occupies and no cell's payload holds, as a percentage of the bytes it occupies. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_movable_init (SeriesCellularum *series, const CarcerMovableInitCfg *args, embed_bool wipes) |
| Assigns a cellblock's movable option: the translation table, its claim bits, the rows of touches and the mover's thread. A cellblock's guard calls this, as movable_init. | |
| EMBED_HOST_DEVICE const CarcerMovableEntry * | mmgr_movable_buf_alloc (SeriesCellularum *series, size_t size, const CellOwner *owner) |
| Takes a persistent cell a move may move, and names it in the table. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_movable_buf_release (SeriesCellularum *series, const CarcerMovableEntry *cell, const CellOwner *owner) |
| Gives a movable cell back and frees its entry. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_movable_buf_read (const SeriesCellularum *series, const CarcerMovableCfg *args) |
| Copies args->bytes from args->offset of a movable cell to args->dst. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_movable_buf_write (SeriesCellularum *series, const CarcerMovableCfg *args) |
| Copies args->bytes from args->src to args->offset of a movable cell. | |
| EMBED_HOST_DEVICE embed_iword | mmgr_movable_buf_compare (const SeriesCellularum *series, const CarcerMovableCfg *args) |
| Orders args->bytes of a movable cell against args->src, or against another cell where args->other_cell holds one. | |
| EMBED_HOST_DEVICE size_t | mmgr_movable_buf_measure (const SeriesCellularum *series, const CarcerMovableCfg *args) |
| The bytes from args->offset of a movable cell to the next zero byte. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_movable_buf_move (SeriesCellularum *series) |
| Moves one movable cell into the first free cell below it, highest cell first. | |
| EMBED_HOST_DEVICE void | mmgr_movable_run (SeriesCellularum *series) |
| The mover: what the thread the program gave runs, until its thread_wait answers EMBED_FALSE. | |
| EMBED_HOST_DEVICE size_t | mmgr_movable_queue_depth (const SeriesCellularum *series) |
| The contexts queued at the cellblock's turnstiles now: those that found every open lane busy and wait for a lane. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_movable_touches (const SeriesCellularum *series, size_t at, size_t *id, size_t *touches) |
| One row of touches a lane, counted as passes go through it. | |
| #define MMGR_ENABLE_HW_MEM_CAPACITY_CB |
Set to 1 to track each tier's high-water mark.
Definition at line 53 of file locus_carcerum.h.
| #define MMGR_CARCER_OWNERS |
The max owners a program's owner table holds.
Definition at line 66 of file locus_carcerum.h.
| #define MMGR_MOVABLE_SETTLE_PERCENT |
The fragmentation at which a cellblock's mover sorts its movable cells, as a percentage of the bytes its persistent tier occupies.
Definition at line 76 of file locus_carcerum.h.
| #define MMGR_MOVABLE_READ_MS |
The milliseconds between the mover's readings of its cellblock.
Definition at line 84 of file locus_carcerum.h.
| #define MMGR_MOVABLE_QUIET_READINGS |
The readings in a row that must find the cellblock quiet before the mover sorts.
Definition at line 89 of file locus_carcerum.h.
| #define MMGR_MOVABLE_BACKOFF_MAX_MS |
The longest the mover waits between readings after a sort it backed off from.
Definition at line 94 of file locus_carcerum.h.
| #define MMGR_MOVABLE_IDLE_MAX_MS |
The longest the mover waits between readings of a settled cellblock that no pass touched since the last reading. Each such reading doubles the wait up to this. A pass or a rise brings the next reading back to MMGR_MOVABLE_READ_MS.
Definition at line 101 of file locus_carcerum.h.
| #define MMGR_CARCER_REGIONS |
The regions of the temporary tier: one stack of cells for each place the host gives a thread, modulo this count. 0 makes the temporary tier one stack that every thread shares.
Definition at line 119 of file locus_carcerum.h.
| #define MMGR_CARCER_REGION_BYTES |
Bytes of each region: its cells with their headers and owner words. A multiple of MMGR_CARCER_ALIGN.
Definition at line 128 of file locus_carcerum.h.
| #define MMGR_CARCER_LARGE_REGION_BYTES |
Bytes of the one large region, at the top of the cellblock, that every temporary take over a region's room goes to, from any thread. 0 refuses such a take.
Definition at line 140 of file locus_carcerum.h.
| #define MMGR_CARCER_LARGE_REGIONS |
1 where the cellblock has the large region, 0 where it has none.
Definition at line 144 of file locus_carcerum.h.
| #define MMGR_CARCER_REGION_COUNT |
The regions in all: one for each place, and the large one where the build declares it.
Definition at line 147 of file locus_carcerum.h.
Referenced by mmgr_series_cellularum_regions_idle().
| #define MMGR_CARCER_REGION_AREA |
Bytes the regions take off the top of every cellblock, 0 where the temporary tier is one stack.
Definition at line 150 of file locus_carcerum.h.
Referenced by mmgr_series_cellularum_idle().
| #define MMGR_CARCER_ALIGN |
Alignment of every prisoner on the way out: one machine word, or the atomic size word's alignment where that is wider.
Definition at line 168 of file locus_carcerum.h.
| #define MMGR_OWNER_PLACE_BITS |
The owner word a cell carries behind its payload, one machine word positioned as fields, high to low. The fields are the owner's place in the table, the completion bit, the signal bits, and the nanosecond of the take. The clock is the library's, and the nanosecond rolls over its bits.
Definition at line 255 of file locus_carcerum.h.
| #define MMGR_OWNER_SIGNAL_BITS |
Definition at line 283 of file locus_carcerum.h.
| #define MMGR_OWNER_TIME_BITS |
Definition at line 286 of file locus_carcerum.h.
| #define MMGR_OWNER_TIME_MASK |
Definition at line 287 of file locus_carcerum.h.
| #define MMGR_OWNER_SIGNAL_SHIFT |
Definition at line 288 of file locus_carcerum.h.
| #define MMGR_OWNER_COMPLETE |
Definition at line 289 of file locus_carcerum.h.
| #define MMGR_OWNER_PLACE_SHIFT |
Definition at line 290 of file locus_carcerum.h.
| #define MMGR_OWNER_PLACE_MASK |
Definition at line 291 of file locus_carcerum.h.
| #define MMGR_OWNER_PLACE | ( | name_, | |
| text_ ) |
One owner's place in the table, counted from 0, as the enumeration MMGR_OWNERS positions names it.
| [in] | name_ | The owner's identity, as declared. |
| [in] | text_ | The owner's name as a reader prints it, unread here. |
Definition at line 321 of file locus_carcerum.h.
| #define MMGR_OWNER_RECORD | ( | name_, | |
| text_ ) |
One owner's record as the table's initializer positions it: its name, its place from 1, nothing counted.
| [in] | name_ | The owner's identity, as declared. |
| [in] | text_ | The owner's name as a reader prints it [BORROWS]. |
Definition at line 329 of file locus_carcerum.h.
| #define MMGR_OWNER_POINTER | ( | name_, | |
| text_ ) |
One owner's identity defined: a const pointer to its record in the table, resolved by the linker.
| [in] | name_ | The owner's identity, as declared. |
| [in] | text_ | The owner's name as a reader prints it, unread here. |
Definition at line 340 of file locus_carcerum.h.
| #define MMGR_OWNER_EXTERN | ( | name_, | |
| text_ ) |
One owner's identity declared, for the header the owner's module reads it through.
| [in] | name_ | The owner's identity, as declared. |
| [in] | text_ | The owner's name as a reader prints it, unread here. |
Definition at line 349 of file locus_carcerum.h.
| #define MMGR_OWNERS | ( | list_ | ) |
The program's owners declared as data: the table positioned, its count, and each owner's identity defined.
| [in] | list_ | The program's list of owners, a macro that takes one macro and applies it to each owner. The form list_(macro_) expands to macro_(name_, text_) for every owner. Here name_ is the identity the owner's module names and text_ the name a reader prints. |
Definition at line 367 of file locus_carcerum.h.
| #define MMGR_CARCER_HALF_BITS |
The bits each boundary has in the word that carries both, half the atomic size word, and the mask of a half.
Definition at line 427 of file locus_carcerum.h.
| #define MMGR_CARCER_HALF_MASK |
Definition at line 428 of file locus_carcerum.h.
| #define MMGR_CARCER_BYTES_MAX |
The reach of a position in a boundary half: half the half's values. The other half is the headroom the bumps a round refuses move the position into before the next writer settles it.
Definition at line 437 of file locus_carcerum.h.
| #define MMGR_CARCER_WANT_MAX |
The max payload one bump may ask. It is the headroom the bumps in flight on the turnstiles' lanes share. Each of them may move its boundary once past MMGR_CARCER_BYTES_MAX before the refusal stops the rest. A take past it goes to the writer's path at once.
Definition at line 444 of file locus_carcerum.h.
| #define MMGR_CARCER_BANK_SHIFT |
The bits of a bank's bytes: a bank is half the reach of a position. A test build can set fewer, so that a small pool spans many banks.
Definition at line 458 of file locus_carcerum.h.
| #define MMGR_CARCER_BANK_BYTES |
The bytes of one bank.
Definition at line 462 of file locus_carcerum.h.
| #define MMGR_CARCER_BANK_FIELD_BITS |
The bits of each field of the closed word above its four flag bits. The fields are the bank count, the frame of the persistent tier and the frame of the temporary tier, in that order.
Definition at line 468 of file locus_carcerum.h.
| #define MMGR_CARCER_BANK_FIELD_MASK |
The mask of one field, at bit 0.
Definition at line 471 of file locus_carcerum.h.
Referenced by mmgr_series_cellularum_banks().
| #define MMGR_CARCER_BANK_COUNT_AT |
The bit of the closed word that each field starts at.
Definition at line 475 of file locus_carcerum.h.
Referenced by mmgr_series_cellularum_banks().
| #define MMGR_CARCER_BANK_END_AT |
Definition at line 476 of file locus_carcerum.h.
| #define MMGR_CARCER_BANK_TOP_AT |
Definition at line 477 of file locus_carcerum.h.
| #define MMGR_CARCER_POOL_BYTES_MAX |
The max bytes one cellblock may hold: one less than the values of a field, times the bytes of a bank. So every frame and the bank count fit their fields.
Definition at line 485 of file locus_carcerum.h.
| #define MMGR_CARCER_BANK_OF | ( | off_ | ) |
The bank an offset is in.
Definition at line 489 of file locus_carcerum.h.
| #define MMGR_CARCER_BANK_COUNT | ( | bytes_ | ) |
The banks a cellblock of bytes_ bytes takes: its bytes rounded up to a whole bank.
Definition at line 492 of file locus_carcerum.h.
| #define MMGR_CARCER_FRAME_CAP | ( | bytes_ | ) |
The highest frame of a cellblock of bytes_ bytes: two banks below its bank count, or bank 0.
Definition at line 500 of file locus_carcerum.h.
| #define MMGR_CARCER_END_FRAME | ( | end_, | |
| bytes_ ) |
The frame a writer gives a persistent end in a cellblock of bytes_ bytes: the end's bank, or the cap.
Definition at line 504 of file locus_carcerum.h.
| #define MMGR_CARCER_BANK_BELOW | ( | top_ | ) |
The bank below a top's own bank, or bank 0.
Definition at line 509 of file locus_carcerum.h.
| #define MMGR_CARCER_TOP_FRAME | ( | top_, | |
| bytes_ ) |
The frame a writer gives a temporary top in a cellblock of bytes_ bytes: the bank below the top's own, or the cap.
Definition at line 515 of file locus_carcerum.h.
| #define MMGR_CARCER_CLOSED_AT_REST | ( | bytes_ | ) |
The closed word of a cellblock at rest over bytes_ bytes. It holds no flag, the bank count, the persistent frame at bank 0, and the temporary frame for the top at the regions' start.
Definition at line 523 of file locus_carcerum.h.
| #define MMGR_CARCER_BOUNDS_AT_REST | ( | bytes_ | ) |
The boundary word of a cellblock at rest over bytes_ bytes: the end at 0, the top's position in its frame.
Definition at line 530 of file locus_carcerum.h.
| #define MMGR_CARCER_STATE_HW |
The high-water members' first values, or nothing where the build tracks none.
Definition at line 607 of file locus_carcerum.h.
| #define MMGR_CARCER_STATE_REGIONS |
The regions' first depths, every one 0, or nothing where the temporary tier is one stack.
Definition at line 620 of file locus_carcerum.h.
| #define MMGR_CARCER_STATE_TURNSTILES |
The turnstiles' first values: each lane word, the top open lane and the queue length at 0.
Definition at line 629 of file locus_carcerum.h.
| #define MMGR_CARCER_STATE | ( | base_, | |
| bytes_ ) |
A cellblock's state as it is over bytes_ bytes at base_ with no cell taken. Both tiers are empty, every mark is at zero, and the zero fill of the storage covers the turnstiles.
| [in] | base_ | First byte of the cellblock [BORROWS]. |
| [in] | bytes_ | Bytes in the cellblock. |
Definition at line 640 of file locus_carcerum.h.
| #define MMGR_CARCER_STATE_HOSPES |
The record of a cellblock over a hospes pool before the program places it: no base, no size, both boundaries at 0, so every take is refused until mmgr_series_cellularum_placed gives the storage.
Definition at line 658 of file locus_carcerum.h.
| #define MMGR_MOVABLE_HEAD_BYTES |
Bytes of the option's state ahead of its turnstiles, which locus_carcerum.c asserts it fits.
Definition at line 732 of file locus_carcerum.h.
| #define MMGR_MOVABLE_CLAIM_BITS |
The bits of one word of the option's claim bits: one an entry.
Definition at line 735 of file locus_carcerum.h.
| #define MMGR_MOVABLE_STORAGE_BYTES | ( | cells_, | |
| width_, | |||
| rows_ ) |
The storage the movable option takes for a table of cells_ entries and rows_ rows of touches.
| [in] | cells_ | Movable cells the table can name at once. |
| [in] | width_ | The lanes open bound the mover reads quiet under, which takes no storage. |
| [in] | rows_ | Rows of touches. |
Definition at line 746 of file locus_carcerum.h.
| #define MMGR_GUARD_MOVABLE_TAKE_MEMBERS |
The two movable members both guards hold ahead of their movable release.
Definition at line 886 of file locus_carcerum.h.
| #define MMGR_GUARD_MOVABLE_SPAN_MEMBERS |
The four movable members both guards hold after their movable release.
Definition at line 896 of file locus_carcerum.h.
| #define MMGR_GUARD_MEMBER_NAMES |
The thirteen member names of both guards, in their order, for EMBED_TABLE_LAYOUT.
Definition at line 905 of file locus_carcerum.h.
| #define MMGR_CARCER_MOVABLE_ENTRIES | ( | prisonsite_, | |
| name_, | |||
| wipe_to_zero_on_release_, | |||
| series_cellularum_ ) |
The movable entries of one cellblock, bound to it through series_cellularum_.
| [in] | prisonsite_ | Site whose name every entry symbol carries. |
| [in] | name_ | Pool whose name the symbols carry alongside the site's. |
| [in] | wipe_to_zero_on_release_ | Security flag, which the option retains for its releases and moves. |
| [in] | series_cellularum_ | The cellblock's record, as a pointer expression. |
Definition at line 982 of file locus_carcerum.h.
| #define MMGR_CARCER_BODY | ( | prisonsite_, | |
| type_, | |||
| name_, | |||
| wipe_to_zero_on_release_, | |||
| hospes_ ) |
Everything one cellblock is: its bytes, its state, and the entries bound to it.
| [in] | prisonsite_ | Site of the cellblock, which every emitted symbol carries. |
| [in] | type_ | MinimumSecurityGuard or MaxSecurityGuard, read by MMGR_CARCER_MEM. |
| [in] | name_ | Pool under the cellblock, which is also its name as a member of its site [BORROWS]. |
| [in] | wipe_to_zero_on_release_ | 1 where a release zeroes the cell first, 0 where it does not. |
| [in] | hospes_ | 1 where the pool is a hospes pool the program places at run time, 0 where its storage is the array its declaration emitted. |
Definition at line 1039 of file locus_carcerum.h.
| #define MMGR_CARCER_STORAGE_0 | ( | prisonsite_, | |
| name_ ) |
A cellblock's record over the array its pool's declaration emitted: the asserts on the array's extent, and the record with the array as its base and the pool's count as its size.
| [in] | prisonsite_ | Site of the cellblock, which the record's symbol carries. |
| [in] | name_ | Pool under the cellblock. |
Definition at line 1099 of file locus_carcerum.h.
| #define MMGR_CARCER_STORAGE_1 | ( | prisonsite_, | |
| name_ ) |
A cellblock's record over a hospes pool: empty until the program places it.
| [in] | prisonsite_ | Site of the cellblock, which the record's symbol carries. |
| [in] | name_ | Pool under the cellblock. |
Definition at line 1113 of file locus_carcerum.h.
| #define MMGR_CARCER_MEM | ( | prisonsite_, | |
| type_, | |||
| name_, | |||
| wipe_to_zero_on_release_, | |||
| hospes_ ) |
One cellblock as a member of its site's type.
| [in] | prisonsite_ | Site of the cellblock, unused here. |
| [in] | type_ | MinimumSecurityGuard or MaxSecurityGuard, the member's type. |
| [in] | name_ | Pool under the cellblock, and the name of the member. |
| [in] | wipe_to_zero_on_release_ | Security flag, unused here. |
| [in] | hospes_ | Hospes flag, unused here. |
Definition at line 1127 of file locus_carcerum.h.
| #define MMGR_CARCER_SEAT | ( | prisonsite_, | |
| type_, | |||
| name_, | |||
| wipe_to_zero_on_release_, | |||
| hospes_ ) |
One cellblock's entries, in the order its guard declares them.
| [in] | prisonsite_ | Site whose name every entry symbol carries. |
| [in] | type_ | Guard type, unused here. |
| [in] | name_ | Pool whose name the symbols carry alongside the site's. |
| [in] | wipe_to_zero_on_release_ | Security flag, unused here. |
| [in] | hospes_ | Hospes flag, unused here. |
Definition at line 1140 of file locus_carcerum.h.
| #define MMGR_MINIMUM_SECURITY | ( | name_ | ) |
Declares a minimum security cellblock over a pool.
| [in] | name_ | Pool under the cellblock, which is also its name as a member of its site [BORROWS]. |
Definition at line 1163 of file locus_carcerum.h.
| #define MMGR_MAXIMUM_SECURITY | ( | name_ | ) |
Declares a max security cellblock over a pool.
| [in] | name_ | Pool under the cellblock, which is also its name as a member of its site [BORROWS]. |
Definition at line 1175 of file locus_carcerum.h.
| #define MMGR_MINIMUM_SECURITY_HOSPES | ( | name_ | ) |
Declares a minimum security cellblock over a hospes pool, one ParsMemoriaeHospes declared: the program gives the storage once, with mmgr_series_cellularum_placed, before the first take.
| [in] | name_ | Hospes pool under the cellblock, which is also its name as a member of its site [BORROWS]. |
Definition at line 1186 of file locus_carcerum.h.
| #define MMGR_MAXIMUM_SECURITY_HOSPES | ( | name_ | ) |
Declares a max security cellblock over a hospes pool, as MMGR_MINIMUM_SECURITY_HOSPES with the wipe on release.
| [in] | name_ | Hospes pool under the cellblock [BORROWS]. |
Definition at line 1194 of file locus_carcerum.h.
| #define MMGR_UNTUPLE | ( | ... | ) |
Strips a tuple's parentheses.
| [in] | ... | The tuple's elements, which its own parentheses deliver as this macro's arguments. |
Definition at line 1203 of file locus_carcerum.h.
| #define MMGR_CARCER_APPLY | ( | what_, | |
| prisonsite_, | |||
| tuple_ ) |
Applies one reader to one cellblock tuple, with the site spliced in ahead of it.
| [in] | what_ | Reader to apply: MMGR_CARCER_BODY, MMGR_CARCER_MEM or MMGR_CARCER_SEAT. |
| [in] | prisonsite_ | Site, which reaches the reader ahead of the tuple's own elements. |
| [in] | tuple_ | One MMGR_MINIMUM_SECURITY or MMGR_MAXIMUM_SECURITY tuple. |
Definition at line 1215 of file locus_carcerum.h.
| #define MMGR_CARCER_APPLY_ | ( | what_, | |
| prisonsite_, | |||
| ... ) |
Expands to what_(prisonsite_, VA_ARGS).
| [in] | what_ | Reader to apply. |
| [in] | prisonsite_ | Site, which reaches the reader ahead of the elements. |
| [in] | ... | The tuple's elements, already flattened by MMGR_UNTUPLE. |
Definition at line 1228 of file locus_carcerum.h.
| #define MMGR_CARCER_W1 | ( | what_, | |
| prisonsite_, | |||
| SeriesCellularum1_ ) |
Applies the reader to a site's one cellblock tuple.
| [in] | what_ | Reader to apply: MMGR_CARCER_BODY, MMGR_CARCER_MEM or MMGR_CARCER_SEAT. |
| [in] | prisonsite_ | Site, which reaches the reader ahead of the tuple's own elements. |
| [in] | SeriesCellularum1_ | The cellblock's tuple. |
Definition at line 1238 of file locus_carcerum.h.
| #define MMGR_CARCER_W2 | ( | what_, | |
| prisonsite_, | |||
| SeriesCellularum1_, | |||
| SeriesCellularum2_ ) |
Applies the reader to a site's two cellblock tuples.
| [in] | what_ | Reader to apply. |
| [in] | prisonsite_ | Site, which reaches the reader with every tuple. |
| [in] | SeriesCellularum1_ | First cellblock's tuple, which MMGR_CARCER_W1 takes. |
| [in] | SeriesCellularum2_ | Second cellblock's tuple, applied after it. |
Definition at line 1251 of file locus_carcerum.h.
| #define MMGR_CARCER_W3 | ( | what_, | |
| prisonsite_, | |||
| SeriesCellularum1_, | |||
| SeriesCellularum2_, | |||
| SeriesCellularum3_ ) |
Applies the reader to a site's three cellblock tuples.
| [in] | what_ | Reader to apply. |
| [in] | prisonsite_ | Site, which reaches the reader with every tuple. |
| [in] | SeriesCellularum1_ | First cellblock's tuple. |
| [in] | SeriesCellularum2_ | Second cellblock's tuple. |
| [in] | SeriesCellularum3_ | Third cellblock's tuple, applied after MMGR_CARCER_W2 expands the first two. |
Definition at line 1265 of file locus_carcerum.h.
| #define MMGR_CARCER_W4 | ( | what_, | |
| prisonsite_, | |||
| SeriesCellularum1_, | |||
| SeriesCellularum2_, | |||
| SeriesCellularum3_, | |||
| SeriesCellularum4_ ) |
Applies the reader to a site's four cellblock tuples.
| [in] | what_ | Reader to apply. |
| [in] | prisonsite_ | Site, which reaches the reader with every tuple. |
| [in] | SeriesCellularum1_ | First cellblock's tuple. |
| [in] | SeriesCellularum2_ | Second cellblock's tuple. |
| [in] | SeriesCellularum3_ | Third cellblock's tuple. |
| [in] | SeriesCellularum4_ | Fourth cellblock's tuple, applied after MMGR_CARCER_W3 expands the first three. |
Definition at line 1280 of file locus_carcerum.h.
| #define MMGR_CARCER_W5 | ( | what_, | |
| prisonsite_, | |||
| SeriesCellularum1_, | |||
| SeriesCellularum2_, | |||
| SeriesCellularum3_, | |||
| SeriesCellularum4_, | |||
| SeriesCellularum5_ ) |
Applies the reader to a site's five cellblock tuples.
| [in] | what_ | Reader to apply. |
| [in] | prisonsite_ | Site, which reaches the reader with every tuple. |
| [in] | SeriesCellularum1_ | First cellblock's tuple. |
| [in] | SeriesCellularum2_ | Second cellblock's tuple. |
| [in] | SeriesCellularum3_ | Third cellblock's tuple. |
| [in] | SeriesCellularum4_ | Fourth cellblock's tuple. |
| [in] | SeriesCellularum5_ | Fifth cellblock's tuple, applied after MMGR_CARCER_W4 expands the first four. |
Definition at line 1297 of file locus_carcerum.h.
| #define MMGR_CARCER_W6 | ( | what_, | |
| prisonsite_, | |||
| SeriesCellularum1_, | |||
| SeriesCellularum2_, | |||
| SeriesCellularum3_, | |||
| SeriesCellularum4_, | |||
| SeriesCellularum5_, | |||
| SeriesCellularum6_ ) |
Applies the reader to a site's six cellblock tuples.
| [in] | what_ | Reader to apply. |
| [in] | prisonsite_ | Site, which reaches the reader with every tuple. |
| [in] | SeriesCellularum1_ | First cellblock's tuple. |
| [in] | SeriesCellularum2_ | Second cellblock's tuple. |
| [in] | SeriesCellularum3_ | Third cellblock's tuple. |
| [in] | SeriesCellularum4_ | Fourth cellblock's tuple. |
| [in] | SeriesCellularum5_ | Fifth cellblock's tuple. |
| [in] | SeriesCellularum6_ | Sixth cellblock's tuple, applied after MMGR_CARCER_W5 expands the first five. |
Definition at line 1315 of file locus_carcerum.h.
| #define MMGR_CARCER_W7 | ( | what_, | |
| prisonsite_, | |||
| SeriesCellularum1_, | |||
| SeriesCellularum2_, | |||
| SeriesCellularum3_, | |||
| SeriesCellularum4_, | |||
| SeriesCellularum5_, | |||
| SeriesCellularum6_, | |||
| SeriesCellularum7_ ) |
Applies the reader to a site's seven cellblock tuples.
| [in] | what_ | Reader to apply. |
| [in] | prisonsite_ | Site, which reaches the reader with every tuple. |
| [in] | SeriesCellularum1_ | First cellblock's tuple. |
| [in] | SeriesCellularum2_ | Second cellblock's tuple. |
| [in] | SeriesCellularum3_ | Third cellblock's tuple. |
| [in] | SeriesCellularum4_ | Fourth cellblock's tuple. |
| [in] | SeriesCellularum5_ | Fifth cellblock's tuple. |
| [in] | SeriesCellularum6_ | Sixth cellblock's tuple. |
| [in] | SeriesCellularum7_ | Seventh cellblock's tuple, applied after MMGR_CARCER_W6 expands the first six. |
Definition at line 1335 of file locus_carcerum.h.
| #define MMGR_CARCER_W8 | ( | what_, | |
| prisonsite_, | |||
| SeriesCellularum1_, | |||
| SeriesCellularum2_, | |||
| SeriesCellularum3_, | |||
| SeriesCellularum4_, | |||
| SeriesCellularum5_, | |||
| SeriesCellularum6_, | |||
| SeriesCellularum7_, | |||
| SeriesCellularum8_ ) |
Applies the reader to a site's eight cellblock tuples.
| [in] | what_ | Reader to apply. |
| [in] | prisonsite_ | Site, which reaches the reader with every tuple. |
| [in] | SeriesCellularum1_ | First cellblock's tuple. |
| [in] | SeriesCellularum2_ | Second cellblock's tuple. |
| [in] | SeriesCellularum3_ | Third cellblock's tuple. |
| [in] | SeriesCellularum4_ | Fourth cellblock's tuple. |
| [in] | SeriesCellularum5_ | Fifth cellblock's tuple. |
| [in] | SeriesCellularum6_ | Sixth cellblock's tuple. |
| [in] | SeriesCellularum7_ | Seventh cellblock's tuple. |
| [in] | SeriesCellularum8_ | Eighth cellblock's tuple, applied after MMGR_CARCER_W7 expands the first seven. |
Definition at line 1359 of file locus_carcerum.h.
| #define MMGR_CARCER_WALK | ( | what_, | |
| prisonsite_, | |||
| ... ) |
Expands the walk that matches the cellblock count.
| [in] | what_ | Reader to apply: MMGR_CARCER_BODY, MMGR_CARCER_MEM or MMGR_CARCER_SEAT. |
| [in] | prisonsite_ | Site, forwarded to the walk ahead of the tuples. |
| [in] | ... | MMGR_MINIMUM_SECURITY and MMGR_MAXIMUM_SECURITY tuples, one per cellblock. |
Definition at line 1376 of file locus_carcerum.h.
| #define LocusCarcerum | ( | prisonsite_, | |
| ... ) |
Declares a prison site and the cellblocks built at it.
| [in] | prisonsite_ | Name of the site. Its cellblocks are members of it. |
| [in] | ... | MMGR_MINIMUM_SECURITY and MMGR_MAXIMUM_SECURITY declarations, one each. |
Definition at line 1396 of file locus_carcerum.h.
| typedef struct CarcerMovableEntry CarcerMovableEntry |
The identity a movable cell's taker holds: a const pointer to the cell's entry in the cellblock's translation table.
Definition at line 680 of file locus_carcerum.h.
| typedef void(*) CarcerIdleEach(void *context, void *at, size_t bytes) |
A span of a cellblock's storage no cell holds, passed to the program: where it starts and its bytes.
Definition at line 1661 of file locus_carcerum.h.
| EMBED_HOST_DEVICE uint64_t mmgr_carcer_hw_clock_ns | ( | void | ) |
The library's clock in nanoseconds, which a cell's owner word carries the take on.
References mmgr_carcer_hw_clock_ns().
Referenced by mmgr_carcer_hw_clock_ns().
| EMBED_PASS_DECLARE | ( | CellOwner | , |
| mmgr_owner_table | ) |
The program's owner table and the owners in it, which MMGR_OWNERS defines once.
References EMBED_PASS_DECLARE().
| EMBED_HOST_DEVICE embed_bool mmgr_owner_listed | ( | const CellOwner * | owner | ) |
Whether an owner is one of the table's.
| [in] | owner | The owner, which may be NULL [BORROWS]. |
References mmgr_owner_listed().
Referenced by mmgr_owner_listed().
|
inlinestatic |
The payload bytes of the cells an owner has now.
| [in] | owner | The owner [BORROWS]. |
Definition at line 392 of file locus_carcerum.h.
References CellOwner::in_use, and mmgr_owner_in_use().
Referenced by mmgr_owner_in_use().
|
inlinestatic |
The max payload bytes an owner has had at once.
| [in] | owner | The owner [BORROWS]. |
Definition at line 404 of file locus_carcerum.h.
References CellOwner::hw, and mmgr_owner_hw().
Referenced by mmgr_owner_hw().
| EMBED_HOST_DEVICE void mmgr_carcer_hw_misnamed | ( | const CellOwner * | named, |
| const CellOwner * | cell_owner, | ||
| size_t | bytes ) |
Told of each give or growth that names an owner other than the one the cell counts to.
| [in] | named | The owner the give or the growth named [BORROWS]. |
| [in] | cell_owner | The owner the cell counts to, NULL where its owner word names no registered owner [BORROWS]. |
| [in] | bytes | The cell's payload bytes. |
References mmgr_carcer_hw_misnamed().
Referenced by mmgr_carcer_hw_misnamed().
| EMBED_HOST_DEVICE size_t mmgr_series_cellularum_persistent_end | ( | const SeriesCellularum * | series | ) |
Offset just past the last persistent cell.
| [in] | series | Cellblock to read [BORROWS]. |
References mmgr_series_cellularum_persistent_end().
Referenced by mmgr_series_cellularum_idle(), and mmgr_series_cellularum_persistent_end().
| EMBED_HOST_DEVICE size_t mmgr_series_cellularum_temporary_top | ( | const SeriesCellularum * | series | ) |
Offset of the lowest temporary cell.
| [in] | series | Cellblock to read [BORROWS]. |
References mmgr_series_cellularum_temporary_top().
Referenced by mmgr_series_cellularum_idle(), and mmgr_series_cellularum_temporary_top().
|
inlinestatic |
The banks a cellblock's bytes take, as its closed word holds the count.
| [in] | series | Cellblock to read [BORROWS]. |
Definition at line 777 of file locus_carcerum.h.
References SeriesCellularum::closed, MMGR_CARCER_BANK_COUNT_AT, MMGR_CARCER_BANK_FIELD_MASK, and mmgr_series_cellularum_banks().
Referenced by mmgr_series_cellularum_banks().
|
inlinestatic |
The bytes one region's stack holds from its end down.
| [in] | series | Cellblock to read [BORROWS]. |
| [in] | region | The region, below MMGR_CARCER_REGION_COUNT; the large region is the last. |
Definition at line 792 of file locus_carcerum.h.
References mmgr_series_cellularum_region_depth().
Referenced by mmgr_series_cellularum_region_depth(), and mmgr_series_cellularum_regions_idle().
|
inlinestatic |
Whether every region is empty.
| [in] | series | Cellblock to read [BORROWS]. |
Definition at line 811 of file locus_carcerum.h.
References MMGR_CARCER_REGION_COUNT, mmgr_series_cellularum_region_depth(), and mmgr_series_cellularum_regions_idle().
Referenced by mmgr_series_cellularum_idle(), and mmgr_series_cellularum_regions_idle().
|
inlinestatic |
Whether a cellblock has no cell out.
| [in] | series | Cellblock to read [BORROWS]. |
Definition at line 836 of file locus_carcerum.h.
References MMGR_CARCER_REGION_AREA, mmgr_series_cellularum_idle(), mmgr_series_cellularum_persistent_end(), mmgr_series_cellularum_regions_idle(), mmgr_series_cellularum_temporary_top(), and SeriesCellularum::size.
Referenced by mmgr_series_cellularum_idle().
|
inlinestatic |
The furthest point of a cellblock's persistent tier so far.
| [in] | series | Cellblock to read [BORROWS]. |
Definition at line 852 of file locus_carcerum.h.
References mmgr_series_cellularum_persistent_hw().
Referenced by mmgr_series_cellularum_persistent_hw().
|
inlinestatic |
The max bytes a cellblock's temporary tier took from the top at one time.
| [in] | series | Cellblock to read [BORROWS]. |
Definition at line 869 of file locus_carcerum.h.
References mmgr_series_cellularum_temporary_hw().
Referenced by mmgr_series_cellularum_temporary_hw().
| EMBED_HOST_DEVICE void * mmgr_persistent_buf_alloc | ( | SeriesCellularum * | series, |
| size_t | size, | ||
| const CellOwner * | owner ) |
Takes size bytes from a cellblock's persistent tier.
| [in,out] | series | Cellblock to take from [BORROWS]. |
| [in] | size | Bytes wanted. |
| [in] | owner | The registered owner that counts the cell [BORROWS]. |
References MMGR_ALLOC_SIZE, and mmgr_persistent_buf_alloc().
Referenced by mmgr_persistent_buf_alloc().
| EMBED_HOST_DEVICE void * mmgr_persistent_max_security_buf_alloc | ( | SeriesCellularum * | series, |
| size_t | size, | ||
| const CellOwner * | owner ) |
Takes size bytes from a max security cellblock's persistent tier.
| [in,out] | series | Cellblock to take from [BORROWS]. |
| [in] | size | Bytes wanted. |
| [in] | owner | The registered owner that counts the cell [BORROWS]. |
References mmgr_persistent_max_security_buf_alloc().
Referenced by mmgr_persistent_max_security_buf_alloc().
| EMBED_HOST_DEVICE void mmgr_persistent_buf_release | ( | SeriesCellularum * | series, |
| void * | prisoner, | ||
| const CellOwner * | owner ) |
Releases a prisoner and leaves the cell's bytes as they are.
| [in,out] | series | Cellblock the prisoner came from [BORROWS]. |
| [in] | prisoner | First byte of the cell [TAKES OWNERSHIP]. |
| [in] | owner | The owner the cell counts to, as its owner word names it [BORROWS]. |
References mmgr_persistent_buf_release().
Referenced by mmgr_persistent_buf_release().
| EMBED_HOST_DEVICE void mmgr_persistent_max_security_buf_release | ( | SeriesCellularum * | series, |
| void * | prisoner, | ||
| const CellOwner * | owner ) |
Zeroes a cell, then releases the prisoner.
| [in,out] | series | Cellblock the prisoner came from [BORROWS]. |
| [in,out] | prisoner | First byte of the cell, zeroed before release [TAKES OWNERSHIP]. |
| [in] | owner | The owner the cell counts to, as its owner word names it [BORROWS]. |
References MMGR_ALLOC_SIZE, and mmgr_persistent_max_security_buf_release().
Referenced by mmgr_persistent_max_security_buf_release().
| EMBED_HOST_DEVICE void * mmgr_buf_grow | ( | SeriesCellularum * | series, |
| void * | prisoner, | ||
| size_t | size, | ||
| const CellOwner * | owner ) |
Grows a cell to size payload bytes in place, where it is the newest cell of its tier.
| [in,out] | series | Cellblock the prisoner came from [BORROWS]. |
| [in,out] | prisoner | First byte of the cell [BORROWS]. |
| [in] | size | Payload bytes the cell is to carry, rounded as a take rounds them. |
| [in] | owner | The owner the cell counts to, as its owner word names it, which also counts the growth [BORROWS]. |
References MMGR_ALLOC_SIZE, and mmgr_buf_grow().
Referenced by mmgr_buf_grow().
| EMBED_HOST_DEVICE void * mmgr_max_security_buf_grow | ( | SeriesCellularum * | series, |
| void * | prisoner, | ||
| size_t | size, | ||
| const CellOwner * | owner ) |
Grows a cell in place as mmgr_buf_grow does, and zeroes the bytes the growth adds.
| [in,out] | series | Cellblock the prisoner came from [BORROWS]. |
| [in,out] | prisoner | First byte of the cell [BORROWS]. |
| [in] | size | Payload bytes the cell is to carry. |
| [in] | owner | The owner that counts a persistent cell's growth [BORROWS]. |
References mmgr_max_security_buf_grow().
Referenced by mmgr_max_security_buf_grow().
| EMBED_HOST_DEVICE void * mmgr_temporary_buf_alloc | ( | SeriesCellularum * | series, |
| size_t | size, | ||
| const CellOwner * | owner ) |
Takes size bytes from a cellblock's temporary tier.
| [in,out] | series | Cellblock to take from [BORROWS]. |
| [in] | size | Bytes wanted. |
| [in] | owner | The registered owner that counts the cell [BORROWS]. |
References MMGR_ALLOC_SIZE, and mmgr_temporary_buf_alloc().
Referenced by mmgr_temporary_buf_alloc().
| EMBED_HOST_DEVICE void * mmgr_temporary_max_security_buf_alloc | ( | SeriesCellularum * | series, |
| size_t | size, | ||
| const CellOwner * | owner ) |
Takes size bytes from a max security cellblock's temporary tier.
| [in,out] | series | Cellblock to take from [BORROWS]. |
| [in] | size | Bytes wanted. |
| [in] | owner | The registered owner that counts the cell [BORROWS]. |
References mmgr_temporary_max_security_buf_alloc().
Referenced by mmgr_temporary_max_security_buf_alloc().
| EMBED_HOST_DEVICE embed_bool mmgr_who_owns_buf | ( | const SeriesCellularum * | series, |
| const void * | at ) |
Whether at lies inside the cellblock's bytes.
| [in] | series | Cellblock to test against [BORROWS]. |
| [in] | at | Address to test [BORROWS]. |
References mmgr_who_owns_buf().
Referenced by mmgr_who_owns_buf().
| EMBED_HOST_DEVICE const CellOwner * mmgr_owner_of_buf | ( | const SeriesCellularum * | series, |
| const void * | prisoner ) |
The owner a cell counts to, read off the word behind its payload.
| [in] | series | Cellblock the prisoner came from [BORROWS]. |
| [in] | prisoner | First byte of the cell [BORROWS]. |
References mmgr_owner_of_buf().
Referenced by mmgr_owner_of_buf().
| EMBED_HOST_DEVICE size_t mmgr_buf_available | ( | SeriesCellularum * | series | ) |
The bytes between the two tiers.
| [in,out] | series | Cellblock to read [BORROWS]. |
References mmgr_buf_available().
Referenced by mmgr_buf_available().
| EMBED_HOST_DEVICE void mmgr_zero_buf | ( | void * | prisoner, |
| size_t | size ) |
Zeroes size bytes at prisoner and releases nothing.
| [in,out] | prisoner | First byte to clear [BORROWS]. |
| [in] | size | Bytes to clear. |
References mmgr_zero_buf().
Referenced by mmgr_zero_buf().
| EMBED_HOST_DEVICE size_t mmgr_align_up_buf | ( | size_t | size | ) |
Rounds size up to a whole machine word.
| [in] | size | Count to round. |
References mmgr_align_up_buf().
Referenced by mmgr_align_up_buf().
| EMBED_HOST_DEVICE void mmgr_series_cellularum_emptied | ( | SeriesCellularum * | series | ) |
Puts a cellblock back to the state of its declaration. Both tiers are empty, the closed word and the turnstiles at rest, the option unassigned, and no byte of its storage touched.
| [in,out] | series | Cellblock to empty [BORROWS]. |
References mmgr_series_cellularum_emptied().
Referenced by mmgr_series_cellularum_emptied().
| EMBED_HOST_DEVICE embed_bool mmgr_series_cellularum_placed | ( | SeriesCellularum * | series, |
| uint8_t * | storage, | ||
| size_t | bytes ) |
Places a cellblock declared over a hospes pool on the storage the program gives: its base and its size set, and the cellblock emptied over them.
| [in,out] | series | Cellblock to place [BORROWS]. |
| [in] | storage | First byte of the storage, aligned to MMGR_ALIGN_BYTES [BORROWS]. |
| [in] | bytes | Bytes of the storage. |
References mmgr_series_cellularum_placed().
Referenced by mmgr_series_cellularum_placed().
| EMBED_HOST_DEVICE void mmgr_series_cellularum_idle_each | ( | SeriesCellularum * | series, |
| CarcerIdleEach | each, | ||
| void * | context ) |
Passes each span of the cellblock's storage that no cell holds to each, with the cellblock closed: the gap between the tiers, and the room of each region above its depth.
| [in,out] | series | Cellblock to read [BORROWS]. |
| [in] | each | The call for each span, run with the cellblock closed. |
| [in] | context | What each is passed first [BORROWS]. |
References mmgr_series_cellularum_idle_each().
Referenced by mmgr_series_cellularum_idle_each().
| EMBED_HOST_DEVICE void mmgr_owner_bytes_taken | ( | const CellOwner * | owner, |
| size_t | bytes ) |
Counts bytes that lie in no cellblock to an owner, as a ring's or a page's are.
| [in] | owner | The registered owner [BORROWS]. |
| [in] | bytes | The bytes. |
References mmgr_owner_bytes_taken().
Referenced by mmgr_owner_bytes_taken().
| EMBED_HOST_DEVICE void mmgr_owner_bytes_given | ( | const CellOwner * | owner, |
| size_t | bytes ) |
Takes bytes mmgr_owner_bytes_taken counted off their owner.
| [in] | owner | The owner that counted them [BORROWS]. |
| [in] | bytes | The bytes. |
References mmgr_owner_bytes_given().
Referenced by mmgr_owner_bytes_given().
| EMBED_HOST_DEVICE size_t mmgr_series_cellularum_fragmentation | ( | const SeriesCellularum * | series | ) |
A cellblock's fragmentation: the bytes its persistent tier occupies and no cell's payload holds, as a percentage of the bytes it occupies.
| [in] | series | Cellblock to read [BORROWS]. |
References mmgr_series_cellularum_fragmentation().
Referenced by mmgr_series_cellularum_fragmentation().
| EMBED_HOST_DEVICE embed_bool mmgr_movable_init | ( | SeriesCellularum * | series, |
| const CarcerMovableInitCfg * | args, | ||
| embed_bool | wipes ) |
Assigns a cellblock's movable option: the translation table, its claim bits, the rows of touches and the mover's thread. A cellblock's guard calls this, as movable_init.
| [in,out] | series | Cellblock the option serves [BORROWS]. |
| [in] | args | The storage, the sizes and the thread's calls [BORROWS]. |
| [in] | wipes | Whether a cell a move leaves or a release gives back gets a zero fill first. |
References mmgr_movable_init().
Referenced by mmgr_movable_init().
| EMBED_HOST_DEVICE const CarcerMovableEntry * mmgr_movable_buf_alloc | ( | SeriesCellularum * | series, |
| size_t | size, | ||
| const CellOwner * | owner ) |
Takes a persistent cell a move may move, and names it in the table.
| [in,out] | series | Cellblock to take from [BORROWS]. |
| [in] | size | Bytes wanted. |
| [in] | owner | The registered owner that counts the cell [BORROWS]. |
References mmgr_movable_buf_alloc().
Referenced by mmgr_movable_buf_alloc().
| EMBED_HOST_DEVICE embed_bool mmgr_movable_buf_release | ( | SeriesCellularum * | series, |
| const CarcerMovableEntry * | cell, | ||
| const CellOwner * | owner ) |
Gives a movable cell back and frees its entry.
| [in,out] | series | Cellblock the cell is in [BORROWS]. |
| [in] | cell | The cell [BORROWS]. |
| [in] | owner | The owner that counts the cell [BORROWS]. |
References mmgr_movable_buf_release().
Referenced by mmgr_movable_buf_release().
| EMBED_HOST_DEVICE embed_bool mmgr_movable_buf_read | ( | const SeriesCellularum * | series, |
| const CarcerMovableCfg * | args ) |
Copies args->bytes from args->offset of a movable cell to args->dst.
| [in,out] | series | Cellblock the cell is in [BORROWS]. |
| [in] | args | The cell, offset, dst and bytes [BORROWS]. |
References mmgr_movable_buf_read().
Referenced by mmgr_movable_buf_read().
| EMBED_HOST_DEVICE embed_bool mmgr_movable_buf_write | ( | SeriesCellularum * | series, |
| const CarcerMovableCfg * | args ) |
Copies args->bytes from args->src to args->offset of a movable cell.
| [in,out] | series | Cellblock the cell is in [BORROWS]. |
| [in] | args | The cell, offset, src and bytes [BORROWS]. |
References mmgr_movable_buf_write().
Referenced by mmgr_movable_buf_write().
| EMBED_HOST_DEVICE embed_iword mmgr_movable_buf_compare | ( | const SeriesCellularum * | series, |
| const CarcerMovableCfg * | args ) |
Orders args->bytes of a movable cell against args->src, or against another cell where args->other_cell holds one.
| [in,out] | series | Cellblock the cell is in [BORROWS]. |
| [in] | args | The cell, offset, and src or other_cell and other_offset, and bytes [BORROWS]. |
References mmgr_movable_buf_compare().
Referenced by mmgr_movable_buf_compare().
| EMBED_HOST_DEVICE size_t mmgr_movable_buf_measure | ( | const SeriesCellularum * | series, |
| const CarcerMovableCfg * | args ) |
The bytes from args->offset of a movable cell to the next zero byte.
| [in,out] | series | Cellblock the cell is in [BORROWS]. |
| [in] | args | The cell and offset [BORROWS]. |
References mmgr_movable_buf_measure().
Referenced by mmgr_movable_buf_measure().
| EMBED_HOST_DEVICE embed_bool mmgr_movable_buf_move | ( | SeriesCellularum * | series | ) |
Moves one movable cell into the first free cell below it, highest cell first.
| [in,out] | series | Cellblock whose cells to move [BORROWS]. |
References mmgr_movable_buf_move().
Referenced by mmgr_movable_buf_move().
| EMBED_HOST_DEVICE void mmgr_movable_run | ( | SeriesCellularum * | series | ) |
The mover: what the thread the program gave runs, until its thread_wait answers EMBED_FALSE.
| [in,out] | series | Cellblock with the option assigned and thread_wait given [BORROWS]. |
References mmgr_movable_run().
Referenced by mmgr_movable_run().
| EMBED_HOST_DEVICE size_t mmgr_movable_queue_depth | ( | const SeriesCellularum * | series | ) |
The contexts queued at the cellblock's turnstiles now: those that found every open lane busy and wait for a lane.
| [in] | series | Cellblock to read [BORROWS]. |
References mmgr_movable_queue_depth().
Referenced by mmgr_movable_queue_depth().
| EMBED_HOST_DEVICE embed_bool mmgr_movable_touches | ( | const SeriesCellularum * | series, |
| size_t | at, | ||
| size_t * | id, | ||
| size_t * | touches ) |
One row of touches a lane, counted as passes go through it.
| [in,out] | series | Cellblock to read [BORROWS]. |
| [in] | at | The row, from 0: the lane of the same place. |
| [out] | id | The id of the last badge through the lane. That is an owner's place, or a thread's id plus one for a pass that names no owner [BORROWS]. |
| [out] | touches | The passes through the lane so far [BORROWS]. |
References mmgr_movable_touches().
Referenced by mmgr_movable_touches().