code wiki / (root) / nx_lysosome.nx

nx_lysosome.nx

buildroot/runtime/nx_lysosome.nx

3055 B99 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_lysosome.nx -- cleanup / recycling queue for terminated cells. Biology: lysosomes are organelles that digest cellular waste -- when a cell dies (apoptosis) or organelle wears out, lysosomes recycle the components. Nishi lysosome is the cleanup queue: terminated cells get enqueued; lysosome drains the queue at caller's cadence, freeing memory + capability tokens + provenance branches back to the pool. Composes: nx_cell -- terminated cells enqueue here nx_brane -- on drain, brane.revoke_all is called nx_chromatin -- germline preserved; chromatin survives lysosome nx_evict_journal -- each lysis logged

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_lysosome.nx nx_cell_anatomy_compose_test.nx nx_lysosome_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_cell_anatomy_compose_test.nxnx_lysosome_test.nx

structs

23struct NxLysosomeEntry
29struct NxLysosome

consts

19const NX_LYSO_OK: nx_int = 0
20const NX_LYSO_ERR_FULL: nx_int = 1
21const NX_LYSO_ERR_EMPTY: nx_int = 2
38const NX_LYSO_ENTRY_BYTES: nx_size = 24

functions

40func nx_lysosome_new(capacity: nx_size) -> *NxLysosome
called by 2: mainmain calls 1: sys_mmap
52func _lyso_at(l: *NxLysosome, idx: nx_size) -> *NxLysosomeEntry
56func nx_lysosome_enqueue(l: *NxLysosome,
called by 2: mainmain calls 1: _lyso_at
77func nx_lysosome_drain_one(l: *NxLysosome) -> nx_int
called by 2: mainmain calls 1: _lyso_at
88func nx_lysosome_count(l: *NxLysosome) -> nx_size
called by 2: mainmain
92func nx_lysosome_total_drained(l: *NxLysosome) -> nx_int
called by 1: main
96func nx_lysosome_is_empty(l: *NxLysosome) -> nx_int
called by 1: main