code wiki / _hdl_build / nx_galx_put.nx

nx_galx_put.nx

buildroot/runtime/_hdl_build/nx_galx_put.nx

6294 B138 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind tooltopic galx
docsdependenciesstructsconstsfunctions

about

nx_galx_put.nx -- CLI + gate for the native cid->path insert. Retires the TSV write path. Usage: nx_galx_put <idx> <blob> <cid> <path> [<cid> <path> ...] insert nx_galx_put --gate <idx> <blob> self-check on COPIES only ⚠VISIBILITY, STATED PLAINLY: nx_gallery_serve loads the idx+blob into its own memory ONCE at startup (sys_read_file, a copy -- not a shared mapping), so a live server does NOT see an insert until it restarts. The insert itself is now native and O(1); making it visible without a restart requires the server to map the index MAP_SHARED, which is a change to a running daemon and is filed rather than smuggled in here. ★ REPORTING "INSERTED" WOULD BE TRUE AND STILL MISLEAD -- the reader is the only judge of whether an image is servable, so say which half you did. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_strconv.nx nx_galx_cid_index.nx nx_galx_cidput.nx nx_galx_put.nx

imports: nx_syscalls.nxnx_strconv.nxnx_galx_cid_index.nxnx_galx_cidput.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gp_puts sys_write sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ nx_galx_cidput nx_galx_hashput sys_openat_rdwr sys_mmap ↻ sys_read sys_close cidx_rd64 sys_lseek cp_len sys_write ↻ cp_w64 cidx_fnv1a gp_lookup sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek ↻ sys_mmap ↻ sys_read ↻ sys_munmap sys_close ↻ gs_cidindex_lookup

structs

none

consts

20const K_MAGIC_1024: i64 = 1024

functions

22func gp_puts(s: *u8) -> i64
called by 2: gp_verdictmain calls 1: sys_write
27func gp_i(v: i64) -> i64
31func gp_verdict(rc: i64) -> i64
called by 1: main calls 1: gp_puts
41func gp_lookup(idx_path: *u8, blob_path: *u8, cid: *u8, out: *u8) -> i64
51func main(argc: i64, argv: *i64) -> i64