code wiki / (root) / nx_mycorrhiza.nx

nx_mycorrhiza.nx

buildroot/runtime/nx_mycorrhiza.nx

10793 B264 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_mycorrhiza.nx -- cross-substrate symbiotic resource exchange. Biology: mycorrhizal fungi form symbiotic networks with ~90% of land plants -- fungus delivers water + minerals (esp. phosphorus) from soil, plant delivers sugars from photosynthesis. Bidirectional, REGULATED, and the partnership only persists when both parties net-benefit. When one partner extracts without giving, the partnership is severed. In Nishi: bridges Nishi-native cells <-> foreign symbiotes (Steam, Linux processes, etc.) for resource exchange under treaty. Composes with [[nx_symbiote]] (existing foreign-process virtual cell) + [[nx_treaty]] (bilateral cooperative agreement) + CONDUCTOR cardinal (heterogeneous-compute orchestration) + [[feedback-reclamation-doctrine -captain-moroni]] (reclaim commodity hardware unused resources). V1 ships exchange-class enum + flow-rate accounting + reciprocity audit.

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_mycorrhiza.nx nx_commons_defect_gate.nx nx_mycorrhiza_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_commons_defect_gate.nxnx_mycorrhiza_test.nx

structs

53struct NxExchangeFlow
64struct NxMycorrhiza

consts

20const NX_MAGIC_1024: i64 = 1024
24const NX_MY_KIND_RAM_BYTES: nx_int = 0
25const NX_MY_KIND_VRAM_BYTES: nx_int = 1
26const NX_MY_KIND_DISK_BYTES: nx_int = 2
27const NX_MY_KIND_CPU_MICROSECONDS: nx_int = 3
28const NX_MY_KIND_GPU_MICROSECONDS: nx_int = 4
29const NX_MY_KIND_NETWORK_BYTES: nx_int = 5
30const NX_MY_KIND_COMPUTED_VALUE: nx_int = 6 // domain-specific Q10 utility
31const NX_MY_KIND_N: nx_int = 7
35const NX_MY_DIR_NATIVE_TO_FOREIGN: nx_int = 0 // Nishi gives, foreign receives
36const NX_MY_DIR_FOREIGN_TO_NATIVE: nx_int = 1 // foreign gives, Nishi receives
37const NX_MY_DIR_N: nx_int = 2
41const NX_MY_V_OK_BALANCED: nx_int = 0 // reciprocity within tolerance
42const NX_MY_V_OK_NATIVE_NET_GIVER: nx_int = 1 // we give more, acceptable
43const NX_MY_V_OK_NATIVE_NET_TAKER: nx_int = 2 // we receive more, acceptable
44const NX_MY_V_EXTRACTION_BY_FOREIGN: nx_int = 3 // foreign takes >> gives
45const NX_MY_V_EXTRACTION_BY_NATIVE: nx_int = 4 // we take >> give (REFUSED)
46const NX_MY_V_SEVERED: nx_int = 5
47const NX_MY_V_INVALID: nx_int = 6
48const NX_MY_V_NULL: nx_int = 7
49const NX_MY_V_N: nx_int = 8
62const NX_MY_F_BYTES: nx_int = 40
76const NX_MY_BYTES: nx_int = 56
201const NX_MY_I64_MAX: nx_int = 9223372036854775807

functions

80func nx_my_kind_is_valid(k: nx_int) -> nx_int
86func nx_my_dir_is_valid(d: nx_int) -> nx_int
92func nx_my_v_is_valid(v: nx_int) -> nx_int
called by 1: main
100func nx_my_new(partnership_id: nx_int,
called by 2: dg_auditmain calls 1: sys_mmap
124func _my_flow_at(m: *NxMycorrhiza, idx: nx_int) -> *NxExchangeFlow
133func nx_my_record_flow(m: *NxMycorrhiza,
159func nx_my_sever(m: *NxMycorrhiza) -> nx_int
called by 1: main
167func nx_my_total_by_kind_dir(m: *NxMycorrhiza,
called by 2: nx_my_audit_kindmain calls 1: _my_flow_at
203func _my_ratio_q10(num: nx_int, den: nx_int) -> nx_int
called by 1: nx_my_audit_kind
221func nx_my_audit_kind(m: *NxMycorrhiza, kind: nx_int) -> nx_int
256func nx_my_flow_count(m: *NxMycorrhiza) -> nx_int
called by 1: main
261func nx_my_is_severed(m: *NxMycorrhiza) -> nx_int
called by 1: main