code wiki / (root) / nx_capture_owned_gate_expanded_t218.nx

nx_capture_owned_gate_expanded_t218.nx

buildroot/runtime/nx_capture_owned_gate_expanded_t218.nx

204898 B3983 linesdepth 0pulls 0 transitivereach 0 importersview sourcekind tooltopic capture
docsdependenciesstructsconstsfunctions

about

nx_tool_run.nx -- R0 of the EXECUTABLE-API rung: the sovereign exec+capture primitive the ecosystem is missing. Today nishifamily.com/api/tools + /mcp only LIST tools (a read-only registry) and MCP tools/call returns a SAFE STUB ("invoked X (capability-authorized)") -- there is NO way to actually RUN an organ and hand back its real stdout. This organ is that missing capability, built hardware-up from raw syscalls (fork/pipe/dup3/execve/wait4), reusing the EXACT proven wrappers from nx_hostctl's hc_dfork_exec so it inherits the same never-brick discipline. NO /bin/sh, NO shell string, NO PATH search -- callers pass an ABSOLUTE ELF path (the allowlist layer that maps tool-name -> path is R1, nx_tool_registry). Synchronous (wait4), unlike hc_dfork_exec's detach -- because an API tools/call needs the child's OUTPUT and EXIT CODE, not a fire-and-forget daemon. license_tier: ORIGINAL syscalls.nx -- thin __syscall wrappers used across modules. Sovereign path: no libc. Every memory allocation, file op, and clock read in the rest of the runtime routes through one of these helpers. Numbers match Linux RV64; NishiOS uses the same set. Extracted from runtime.nx and ir.nx's copy-pasted helpers so the module-import build doesn't produce duplicate symbols.

dependencies 0 imports · 0 importers

imports: none

imported by: nobody (leaf or entry point)

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

main gv_ctr 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 ↻ sys_mmap_try cg_owned sys_mmap_try ↻ tr_run_capture_owned tr_run_capture_core_owned sys_mmap_shared tr_clock_ms sys_clock_gettime_mono sys_munmap sys_pipe2 sys_fork sys_close sys_default_signal sys_mmap ↻ sys_bind_parent_lifetime sys_prctl sys_exit ↻ sys_setpgid sys_dup3 sys_chdir sys_mmap ↻ sys_execve_clean sys_close_inherited

structs

2268struct NxBufDyn
2389struct NxBufOwned { buf:*u8, len:i64, cap:i64, }

consts

223const NX_BUF_TINY: nx_size = 64
224const NX_BUF_SMALL: nx_size = 256
225const NX_BUF_MEDIUM: nx_size = 4096
226const NX_BUF_LARGE: nx_size = 65536
227const NX_BUF_HUGE: nx_size = 1048576
231const NX_TIER_MCU: nx_int = 0
232const NX_TIER_SOVEREIGN_CHIP: nx_int = 1
233const NX_TIER_FAMILY_DEVICE: nx_int = 2
234const NX_TIER_WORKSTATION: nx_int = 3
235const NX_TIER_SERVER: nx_int = 4
236const NX_TIER_HPC: nx_int = 5
240const NX_NUM_N0_I32: nx_int = 0
241const NX_NUM_N1_I64: nx_int = 1
242const NX_NUM_N2_I128: nx_int = 2
243const NX_NUM_N3_I256: nx_int = 3
244const NX_NUM_N4_I512: nx_int = 4
245const NX_NUM_N5_BIGINT: nx_int = 5
253const NX_SIZEOF_NX_INT: nx_size = 8 // nx_int currently i64 -> 8 bytes
254const NX_SIZEOF_NX_SIZE: nx_size = 8 // nx_size always pointer-width
255const NX_SIZEOF_NX_IDX: nx_size = 8 // nx_idx alias of nx_size
259const NX_FD_STDIN: nx_fd = 0
260const NX_FD_STDOUT: nx_fd = 1
261const NX_FD_STDERR: nx_fd = 2
263const SYS_MAGIC_1024: i64 = 1024
264const SYS_MAGIC_1000000: i64 = 1000000
265const SYS_MAGIC_4294967296: i64 = 4294967296
267const SYS_READ_GROW_INIT: i64 = 65536
268const SYS_MAGIC_100000: i64 = 100000
286const SYS_READ: i64 = 0
287const SYS_WRITE: i64 = 1
288const SYS_CLOSE: i64 = 3
289const SYS_LSEEK: i64 = 8
290const SYS_OPENAT: i64 = 257
291const SYS_EXIT: i64 = 60
292const SYS_MMAP: i64 = 9
293const SYS_CLOCK_GETTIME: i64 = 228
294const SYS_IOCTL: i64 = 16
295const SYS_CLOCK_NANOSLEEP: i64 = 230
299const SYS_CHROOT: i64 = 161
300const SYS_MOUNT: i64 = 165
301const SYS_UNSHARE: i64 = 272
302const SYS_GETUID: i64 = 102
303const SYS_GETGID: i64 = 104
304const SYS_POLL: i64 = 7
308const SYS_READ: i64 = 63
309const SYS_WRITE: i64 = 64
310const SYS_CLOSE: i64 = 57
311const SYS_LSEEK: i64 = 62
312const SYS_OPENAT: i64 = 56
313const SYS_EXIT: i64 = 93
314const SYS_MMAP: i64 = 222
315const SYS_CLOCK_GETTIME: i64 = 113
316const SYS_IOCTL: i64 = 29
317const SYS_CLOCK_NANOSLEEP: i64 = 115
324const SYS_CHROOT: i64 = 51
325const SYS_MOUNT: i64 = 40
326const SYS_UNSHARE: i64 = 97
327const SYS_GETUID: i64 = 174
328const SYS_GETGID: i64 = 176
329const SYS_POLL: i64 = 73
387const SYS_PATH_MAX: i64 = 4096 // Linux PATH_MAX; getcwd returns -ERANGE below it
391const MODE_0755: i64 = 0x1ed // rwxr-xr-x : default mode for a created directory
406const AT_FDCWD: i64 = -100
511const NX_MO_RELAXED: i64 = 0
512const NX_MO_CONSUME: i64 = 1
513const NX_MO_ACQUIRE: i64 = 2
514const NX_MO_RELEASE: i64 = 3
515const NX_MO_ACQ_REL: i64 = 4
516const NX_MO_SEQ_CST: i64 = 5
518const NXA_SMALL_MAX: i64 = 256
519const NXA_CHUNK: i64 = 262144
520const NXA_ALIGN: i64 = 16
521const NXA_GAP: i64 = 16
522const NXA_STATE: i64 = 4096
528const NXA_RING: i64 = 128
529const NXA_RBASE: i64 = 64
564const NXA_LOCK: i64 = 4
572const NXA_LOCK_WARN: i64 = NXA_RING * 8
576const NXA_LOCK_WARNED: i64 = 5
578const NXA_CHUNKBASE: i64 = 320
579const NXA_CHUNKMAX: i64 = 192
600const NXA_MAP_INVALID:i64=0-22 // Linux EINVAL, a protocol value rather than a resource budget.
652const SYS_STATFS_X86_MEASURED: i64 = 137
653const STATFS_BUF_BYTES: i64 = 144
654const STATFS_I_BSIZE: i64 = 1
655const STATFS_I_BLOCKS: i64 = 2
656const STATFS_I_BAVAIL: i64 = 4
657const STATFS_PERMIL: i64 = 1000
658const STATFS_ERR: i64 = 0 - 1
1003const O_RDONLY: i64 = 0
1004const O_WRONLY_CT: i64 = 0x241 // O_CREAT | O_WRONLY | O_TRUNC
1005const O_WRONLY_CA: i64 = 0x441 // O_CREAT | O_WRONLY | O_APPEND
1013const O_RDWR_CREATE: i64 = 0x42
1034const MODE_0644: i64 = 0x1a4 // rw-r--r-- : default mode for a generated artifact
1039const MODE_0755: i64 = 0x1ed
1052const ACCEPT_TMO_S: i64 = 30
1059const O_WRONLY_CREATE_EXCLUSIVE: i64 = 0x1 | 0x40 | 0x80
1065const O_DIRECTORY: i64 = 0x10000
1079const O_CLOEXEC: i64 = 0x80000
1080const O_NOFOLLOW: i64 = 0x20000
1081const O_NONBLOCK: i64 = 0x800
1082const MODE_0600: i64 = 0x180
1147const SYS_LOCK_SH: i64 = 1
1148const SYS_LOCK_EX: i64 = 2
1149const SYS_LOCK_NB: i64 = 4
1150const SYS_LOCK_UN: i64 = 8
1195const SYS_SETPGID: i64 = 109
1198const SYS_SETPGID: i64 = 154
1221const RLIMIT_CPU: i64 = 0
1222const RLIMIT_AS: i64 = 9
1223const WNOHANG: i64 = 1
1317const SYS_CLONE: i64 = 56
1318const SYS_EXECVE: i64 = 59
1319const SYS_WAIT4: i64 = 61
1320const SYS_PIPE2: i64 = 293
1321const SYS_DUP3: i64 = 292
1325const SYS_CLONE: i64 = 220
1326const SYS_EXECVE: i64 = 221
1327const SYS_WAIT4: i64 = 260
1328const SYS_PIPE2: i64 = 59
1329const SYS_DUP3: i64 = 24
1335const CLONE_VM: i64 = 0x00000100
1336const CLONE_VFORK: i64 = 0x00004000
1337const SIGCHLD: i64 = 17
1387const NX_SYS_PRCTL: i64 = 167
1388const NX_PR_SET_PDEATHSIG: i64 = 1
1389const NX_PR_SET_CHILD_SUBREAPER: i64 = 36
1404const SYS_WAITID_PORTABLE: i64 = 95
1405const NX_WAIT_P_PID: i64 = 1
1406const NX_WAIT_EXITED: i64 = 4
1407const NX_WAIT_NOWAIT: i64 = 0x01000000
1408const NX_WAIT_SIGINFO_BYTES: i64 = 128
1415const NX_FD_DENT_BUFFER: i64 = 4096
1416const NX_SYS_CLOSE_RANGE: i64 = 436 // Linux x86_64 and asm-generic ABI
1417const NX_FD_UINT_MAX: i64 = 4294967295
1589const SYS_GETDENTS64: i64 = 217
1592const SYS_GETDENTS64: i64 = 61
1595const DT_UNKNOWN: i64 = 0
1596const DT_FIFO: i64 = 1
1597const DT_CHR: i64 = 2
1598const DT_DIR: i64 = 4
1599const DT_BLK: i64 = 6
1600const DT_REG: i64 = 8
1601const DT_LNK: i64 = 10
1602const DT_SOCK: i64 = 12
1790const SYS_SOCKET: i64 = 41
1791const SYS_BIND: i64 = 49
1792const SYS_LISTEN: i64 = 50
1793const SYS_ACCEPT: i64 = 43
1794const SYS_CONNECT: i64 = 42
1795const SYS_SETSOCKOPT: i64 = 54
1796const SYS_SENDTO: i64 = 44
1797const SYS_RECVFROM: i64 = 45
1798const SYS_SHUTDOWN: i64 = 48
1802const SYS_SOCKET: i64 = 198
1803const SYS_BIND: i64 = 200
1804const SYS_LISTEN: i64 = 201
1805const SYS_ACCEPT: i64 = 202
1806const SYS_CONNECT: i64 = 203
1807const SYS_SETSOCKOPT: i64 = 208
1808const SYS_SENDTO: i64 = 206
1809const SYS_RECVFROM: i64 = 207
1810const SYS_SHUTDOWN: i64 = 210
1814const SOL_SOCKET: i64 = 1
1815const SO_REUSEADDR: i64 = 2
1820const SO_SNDTIMEO: i64 = 21
1821const SO_RCVTIMEO: i64 = 20
1849const SYS_ALARM: i64 = 37
1852const AF_INET: i64 = 2
1853const SOCK_STREAM: i64 = 1
1854const SOCK_DGRAM: i64 = 2
1960const SYS_SENDMSG: i64 = 46
1961const SYS_RECVMSG: i64 = 47
1962const SYS_SOCKETPAIR: i64 = 53
1963const SCM_AF_UNIX: i64 = 1
1964const SCM_SOL_SOCKET: i64 = 1
1965const SCM_RIGHTS_TYPE: i64 = 1
1966const SCM_MSG_CMSG_CLOEXEC: i64 = 1073741824
1967const SCM_MSGHDR_BYTES: i64 = 56
1968const SCM_MSGHDR_OFF_IOV: i64 = 16
1969const SCM_MSGHDR_OFF_IOVLEN: i64 = 24
1970const SCM_MSGHDR_OFF_CTRL: i64 = 32
1971const SCM_MSGHDR_OFF_CTRLLEN: i64 = 40
1972const SCM_IOVEC_BYTES: i64 = 16
1973const SCM_IOVEC_OFF_BASE: i64 = 0
1974const SCM_IOVEC_OFF_LEN: i64 = 8
1975const SCM_CMSG_OFF_LEN: i64 = 0
1976const SCM_CMSG_OFF_LEVEL: i64 = 8
1977const SCM_CMSG_OFF_TYPE: i64 = 12
1978const SCM_CMSG_OFF_DATA: i64 = 16
1979const SCM_CMSG_LEN_1FD: i64 = 20
1980const SCM_CMSG_SPACE_1FD: i64 = 24
1981const SCM_IOV_COUNT_ONE: i64 = 1
1982const SCM_U32_BYTES: i64 = 4
1983const SCM_BYTE_RADIX: i64 = 256
1984const SCM_FDPAIR_BYTES: i64 = 8
1987const SCM_PAYLOAD_BYTES: i64 = 1
1988const SCM_PAYLOAD_BYTE: i64 = 70
1992const SCM_ERR_NO_CMSG: i64 = 0 - 901
1993const SCM_ERR_CMSG_LEN: i64 = 0 - 902
1994const SCM_ERR_CMSG_LEVEL: i64 = 0 - 903
1995const SCM_ERR_CMSG_TYPE: i64 = 0 - 904
2067const SCM_SUN_PATH_OFF: i64 = 2 // sockaddr_un = [sa_family: u16][sun_path: 108]
2068const SCM_SUN_BYTES: i64 = 110
2069const SCM_SUN_PATH_MAX: i64 = 107
2194const NX_FILE_PERMISSION_MASK:i64=511
2195const NX_FILE_DESCRIPTOR_INVALID:i64=0-22
2201const NX_STAT_X64_BYTES:i64=144
2202const NX_STAT_X64_MODE_OFFSET:i64=24
2203const NX_STAT_X64_BLOCK_OFFSET:i64=56
2204const NX_STAT_X64_SIZE_OFFSET:i64=48
2205const NX_STAT_X64_DEVICE_OFFSET:i64=0
2206const NX_STAT_X64_INODE_OFFSET:i64=8
2207const NX_STAT_TYPE_MASK:i64=61440
2208const NX_STAT_REGULAR_FILE:i64=32768
2274const NX_BD_BYTES: i64 = 24
2275const NX_BD_MIN_CAP: i64 = 64
2276const NX_BD_MIN_GROW: i64 = 64
2390const NX_BO_BYTES:i64=24
2391const NX_BO_I64_MAX:i64=9223372036854775807
2392const NX_BO_INVALID:i64=-100
2393const NX_BO_RANGE:i64=-101
2394const NX_BO_CAPACITY:i64=-102
2395const NX_BO_ALLOCATION:i64=-103
2396const NX_BO_ALIAS:i64=-104
2397const NX_BO_RELEASE:i64=-105
2437const TR_ERR_DRAIN: i64 = 0 - 8
2438const TR_ERR_FD_SETUP: i64 = 0 - 12
2439const TR_ERR_PARENT_LIFETIME: i64 = 0 - 11
2440const TR_DRAIN_BYTES: i64 = 4096
2442const TR_EINTR: i64 = 0 - 4
2444const TR_EINTR_MAX: i64 = 4096
2461const TR_EXIT_EXECFAIL: i64 = 127
2462const TR_MODE_0644: i64 = 420
2618const TR_ERR_TIMEOUT: i64 = 0 - 5
2619const TR_SIGKILL: i64 = 9
2652const TR_PROMOTE: i64 = 0 - 7 // distinct from TR_ERR_TIMEOUT (-5) and TR_ERR_CHDIR (-6)
2653const TR_POLLFD_BYTES: i64 = 8 // sizeof(struct pollfd)
2654const TR_POLLIN: i64 = 1 // POLLIN
2655const TR_PF_EV_OFF: i64 = 4 // offsetof(struct pollfd, events)
2656const TR_PF_RE_OFF: i64 = 6 // offsetof(struct pollfd, revents)
2657const TR_PF_FD_BYTES: i64 = 4 // sizeof(i32 fd)
2658const TR_BITS_PER_BYTE: i64 = 8
2659const TR_BYTE_MASK: i64 = 0xff
2755const TR_ERR_CHDIR: i64 = 0 - 6
2763const TR_FIT: i64 = 0
2764const TR_CUT: i64 = 1
2804const TR_CONTROL_BYTES: i64 = 4096
2805const TR_ERR_GROUP: i64 = 0 - 9
2806const TR_ERR_ALLOC: i64 = 0 - 10
2807const TR_ECHILD: i64 = 0 - 10 // Linux errno, distinct from the public result namespace
3078const GV_NL: i64 = 10
3082const GV_PLAN_HEADER: i64 = 3
3083const GV_PLAN_ENTRY: i64 = 3
3084const GV_I64_BYTES: i64 = 8
3173const GV_CTR_BYTES: i64 = 24
3174const GV_NUM_SCRATCH: i64 = 28
3175const GV_ZERO: i64 = 48
3176const GV_B10: i64 = 10
3219const CE_ENV_PUBLISHED: i64 = 0
3220const CE_ENV_REFUSED_BARE: i64 = 1
3221const CE_ENV_REFUSED_NO_INTERVAL: i64 = 2
3222const CE_ENV_REFUSED_EXCLUDES: i64 = 3
3371const GV_MODE_644: i64 = 420
3372const GV_LINE: i64 = 512
3373const GV_TAB: i64 = 9
3374const GV_SLASH: i64 = 47
3375const GV_MINUS: i64 = 45
3583const GV_ENV_FIELDS: i64 = 16
3584const GV_ENV_BYTES: i64 = 128 // GV_ENV_FIELDS * 8
3585const GV_ENV_K: i64 = 0
3586const GV_ENV_N: i64 = 1
3587const GV_ENV_RATE: i64 = 2
3588const GV_ENV_WLO: i64 = 3
3589const GV_ENV_WHI: i64 = 4
3590const GV_ENV_BLO: i64 = 5
3591const GV_ENV_BHI: i64 = 6
3592const GV_ENV_LO: i64 = 7
3593const GV_ENV_HI: i64 = 8
3594const GV_ENV_CLUSTERS: i64 = 9
3595const GV_ENV_B: i64 = 10
3596const GV_ENV_SEED: i64 = 11
3597const GV_ENV_MEASURED: i64 = 12
3598const GV_ENV_Z: i64 = 13
3599const GV_ENV_WIDTH: i64 = 14
3600const GV_ENV_TARGET: i64 = 15
3601const GV_ENV_REFUSED_PARTITION: i64 = 0 - 1
3602const GV_MICRO: i64 = 1000000
3603const GV_PERMIL: i64 = 1000
3605const GV_Z95_MICRO: i64 = 1959964
3608const GV_SQRT_IN_SCALE: i64 = 100
3609const GV_SQRT_OUT_SCALE: i64 = 10000
3611const GV_BOOT_B_DEFAULT: i64 = 1000
3613const GV_BOOT_SEED_DEFAULT: i64 = 20260827
3615const GV_PM_A: i64 = 16807
3616const GV_PM_M: i64 = 2147483647
3618const GV_ENV_N_MAX: i64 = 2000000000
3620const GV_ISQRT_HI: i64 = 3037000499
3622const GV_HIST_BINS: i64 = 1001
3623const GV_HIST_BYTES: i64 = 8008 // GV_HIST_BINS * 8
3625const GV_PCT_LO_PERMIL: i64 = 25
3626const GV_PCT_HI_PERMIL: i64 = 975
3627const GV_ENV_UNDECLARED: *u8 = "UNDECLARED"

functions

332func sys_ioctl(fd: i64, request: i64, arg: i64) -> i64
343func sys_poll(fds: *u8, nfds: i64, timeout_ms: i64) -> i64
349func sys_write(fd: i64, buf: *u8, count: i64) -> i64
353func sys_read(fd: i64, buf: *u8, count: i64) -> i64
357func sys_close(fd: i64) -> i64
367func sys_chdir(path: *u8) -> i64
called by 1: tr_run_capture_core_owned calls 1: sys_mmap
392func sys_getcwd(buf: *u8, cap: i64) -> i64
calls 1: sys_mmap
411func sys_unlinkat(path: *u8) -> i64
418func sys_fchmodat(path: *u8, mode: i64) -> i64
calls 1: sys_mmap
434func sys_exit_group(code: i64) -> i64
451func sys_setpriority(prio: i64) -> i64
459func sys_setpriority_of(pid: i64, prio: i64) -> i64
601func sys_munmap_direct(addr:*u8,len:i64)->i64
606func sys_munmap(addr: *u8, len: i64) -> i64
613func sys_lseek(fd: i64, offset: i64, whence: i64) -> i64
661func sys_statfs(path: *u8, buf: *i64) -> i64
666func sys_fs_avail_bytes(path: *u8) -> i64
675func sys_fs_used_permil(path: *u8) -> i64
684func sys_exit(code: i64) -> i64
718func nxa_dump_printable(src: i64, n: i64) -> i64
called by 1: nxa_report_overrun calls 1: sys_write
739func nxa_dump_sizes() -> i64
called by 1: nxa_report_overrun calls 1: sys_write
764func nxa_report_overrun(sz: i64, gs: i64) -> i64
794func nxa_die(msg: *u8) -> i64
called by 1: sys_mmap calls 2: sys_writesys_exit
804func nxa_lock_addr() -> *i64
812func nxa_lock_take() -> i64
called by 1: sys_mmap calls 2: nxa_lock_addrsys_write
841func nxa_lock_give() -> i64
called by 1: sys_mmap calls 1: nxa_lock_addr
855func sys_mmap_try(size:i64)->*u8
862func sys_mmap(size: i64) -> *u8
944func sys_arena_mark() -> i64
calls 1: sys_mmap
958func sys_arena_reset() -> i64
982func sys_mmap_shared(size: i64) -> *u8
996func sys_madvise(addr: *u8, len: i64, advice: i64) -> i64
1007func sys_openat_rd(path: *u8) -> i64
1014func sys_openat_rdwr(path: *u8, mode: i64) -> i64
1053func sys_openat_wr(path: *u8, mode: i64) -> i64
called by 1: tr_run_redirect
1060func sys_openat_exclusive(path: *u8, mode: i64) -> i64
1066func sys_openat_directory(path: *u8) -> i64
1073func sys_openat_append(path: *u8, mode: i64) -> i64
called by 1: gv_journal
1083func sys_openat_lock(path: *u8) -> i64
1091func sys_symlinkat(target: *u8, linkpath: *u8) -> i64
1103func sys_readlinkat(path: *u8, buf: *u8, cap: i64) -> i64
1120func sys_renameat(oldpath: *u8, newpath: *u8) -> i64
1133func sys_fsync(fd: i64) -> i64
1151func sys_flock(fd: i64, op: i64) -> i64
1159func sys_fstatat(path: *u8, statbuf: *u8) -> i64
1166func sys_utimensat(path: *u8, times: *i64) -> i64
1185func nx_kill(pid: i64, sig: i64) -> i64 { return __syscall(129, pid, sig, 0, 0, 0, 0) }
1200func sys_setpgid(pid: i64, pgid: i64) -> i64 { return __syscall(SYS_SETPGID, pid, pgid, 0, 0, 0, 0) }
1214func nx_prlimit(pid: i64, resource: i64, new_limit: *u8, old_limit: *u8) -> i64
1226func sys_mkdir(path: *u8, mode: i64) -> i64 { return __syscall(34, AT_FDCWD, path, mode, 0, 0, 0) }
1229func nx_chmod(path: *u8, mode: i64) -> i64 { return __syscall(53, AT_FDCWD, path, mode, 0, 0, 0) }
1233func nx_setsid() -> i64 { return __syscall(112, 0, 0, 0, 0, 0, 0) }
1237func sys_clock_gettime_mono(ts: *i64) -> i64
1245func sys_clock_gettime_real(ts: *i64) -> i64
1250func sys_now_realtime_sec() -> i64
1257func sys_now_realtime_ms() -> i64
1269func sys_now_realtime_us() -> i64
1278func sys_now_ms() -> i64
1289func sys_now_us() -> i64
1300func sys_clock_now_us() -> i64
calls 1: sys_now_us
1350func sys_unshare(flags: i64) -> i64
1353func sys_mount(source: *u8, target: *u8, fs_type: *u8, mountflags: i64, data: *u8) -> i64
1356func sys_chroot(path: *u8) -> i64
1359func sys_getuid() -> i64
1362func sys_getgid() -> i64
1366func sys_fork() -> i64
1390func sys_prctl(option: i64, arg: i64) -> i64
1393func sys_bind_parent_lifetime(expected_parent: i64, signal: i64) -> i64
1409func sys_waitid(idtype: i64, id: i64, info: *u8, options: i64) -> i64
called by 1: tr_observe_exit
1418func sys_close_inherited_proc(first: i64) -> i64
1459func sys_close_inherited(first: i64) -> i64
1465func sys_execve_clean(path: *u8, argv: *i64, envp: *i64) -> i64
1471func sys_execve(path: *u8, argv: *i64, envp: *i64) -> i64
called by 1: sys_execve_clean
1480func sys_wait4(pid: i64, status: *i64, options: i64) -> i64
1486func wait_exit_code(status: i64) -> i64
called by 1: wait_status_rc
1494func wait_term_signal(status: i64) -> i64
called by 1: wait_status_rc
1519func wait_status_rc(status: i64) -> i64
1542func sys_default_signal(sig: i64) -> i64
1551func sys_ignore_sigpipe() -> i64
calls 1: sys_mmap
1566func sys_pipe2(fds: *i64, flags: i64) -> i64
1572func sys_dup3(oldfd: i64, newfd: i64, flags: i64) -> i64
1606func sys_getdents64(fd: i64, buf: *u8, buf_len: i64) -> i64
1612func dirent_reclen(rec: *u8) -> i64
1619func dirent_type(rec: *u8) -> i64
1624func dirent_name(rec: *u8) -> *u8
1631func sys_read_file(path: *u8, out_len: *i64) -> *u8
1713func sys_free_file(buf: *u8, len: i64) -> i64
calls 1: sys_munmap
1724func sys_map_file(path: *u8, out_len: *i64) -> *u8
1742func sys_sleep_ms(ms: i64) -> i64
1826func sys_setsockopt(fd: i64, level: i64, optname: i64,
1836func sys_set_socket_timeout(fd: i64, secs: i64) -> i64
1850func sys_alarm(secs: i64) -> i64 { return __syscall(SYS_ALARM, secs, 0, 0, 0, 0, 0) }
1856func sys_socket(domain: i64, sock_type: i64, protocol: i64) -> i64
1868func sockaddr_in_init(addr: *u8, port: i64) -> i64
1891func sys_bind(fd: i64, addr: *u8, addr_len: i64) -> i64
called by 1: sys_unix_listen
1894func sys_listen(fd: i64, backlog: i64) -> i64
called by 1: sys_unix_listen
1901func sys_accept(fd: i64) -> i64
1904func sys_accept_with_addr(fd: i64, addr: *u8, addr_len: *i64) -> i64
1908func sys_shutdown(fd: i64, how: i64) -> i64
1911func sys_connect(fd: i64, addr: *u8, addr_len: i64) -> i64
called by 1: sys_unix_connect_fd
1914func sys_sendto(fd: i64, buf: *u8, n: i64, flags: i64,
1918func sys_recvfrom(fd: i64, buf: *u8, n: i64, flags: i64,
1997func scm_zero(base: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { base[i] = 0; i = i + 1 } return 0 }
1998func scm_put_i64(base: *u8, off: i64, v: i64) -> i64
2003func scm_get_i64(base: *u8, off: i64) -> i64
called by 1: sys_recv_fd
2010func scm_put_u32(base: *u8, off: i64, v: i64) -> i64
called by 1: sys_send_fd
2020func scm_get_u32(base: *u8, off: i64) -> i64
called by 1: sys_recv_fd
2032func sys_sendmsg(fd: i64, msg: *u8, flags: i64) -> i64
called by 1: sys_send_fd
2035func sys_recvmsg(fd: i64, msg: *u8, flags: i64) -> i64
called by 1: sys_recv_fd
2059func sys_socketpair(domain: i64, sock_type: i64, protocol: i64, sv: *u8) -> i64
2070func sys_unix_listen(path: *u8, backlog: i64) -> i64
2098func sys_unix_connect_fd(path: *u8) -> i64
2122func sys_send_fd(sock: i64, fd: i64) -> i64
2156func sys_recv_fd(sock: i64, flags: i64) -> i64
2196func sys_fchmod_fd(fd:i64,mode:i64)->i64
2209func sys_fstat_fd(fd:i64,stat:*u8)->i64
2213func sys_stat_permissions(stat:*u8)->i64
2278func nx_bd_new(initial_cap: i64) -> *NxBufDyn
calls 1: sys_mmap
2290func nx_bd_grow(b: *NxBufDyn, extra: i64) -> i64
called by 2: nx_bd_bytenx_bd_bytes calls 1: sys_mmap
2307func nx_bd_byte(b: *NxBufDyn, v: i64) -> i64
2314func nx_bd_bytes(b: *NxBufDyn, src: *u8, n: i64) -> i64
calls 1: nx_bd_grow
2325func nx_bd_u16(b: *NxBufDyn, v: i64) -> i64
calls 1: nx_bd_byte
2330func nx_bd_u32(b: *NxBufDyn, v: i64) -> i64
calls 1: nx_bd_byte
2337func nx_bd_u64(b: *NxBufDyn, v: i64) -> i64
calls 1: nx_bd_byte
2347func nx_bd_str(b: *NxBufDyn, s: *u8) -> i64
calls 1: nx_bd_byte
2357func nx_bd_strz(b: *NxBufDyn, s: *u8) -> i64
calls 1: nx_bd_byte
2366func nx_bd_clear(b: *NxBufDyn) -> i64
2373func nx_bd_patch_u32(b: *NxBufDyn, off: i64, v: i64) -> i64
2398func nx_bo_state(b:*NxBufOwned)->i64
2405func nx_bo_append(b:*NxBufOwned,src:*u8,n:i64,max_bytes:i64)->i64
2427func nx_bo_release(b:*NxBufOwned)->i64
called by 1: main calls 2: nx_bo_statesys_munmap_direct
2464func tr_exec_failed(path: *u8) -> i64
2510func tr_run_redirect(path: *u8, argv: *i64, out_path: *u8, err_path: *u8) -> i64
2548func tr_run_capture(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64) -> i64
2623func tr_run_capture_to(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64) -> i64
called by 1: tr_run1_to calls 1: tr_run_capture_tr
2660func tr_pollfd_set(p: *u8, fd: i64) -> i64
2672func tr_run_capture_deadline(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, deadline_ms: i64, out_pid: *i64, out_rfd: *i64) -> i64
2756func tr_run_capture_cwd(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64, cwd: *u8) -> i64
2765func tr_drain_tr(rfd: i64, out: *u8, cap: i64, trunc: *i64) -> i64
2798func tr_run_capture_tr(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64, trunc: *i64) -> i64
2808func tr_clock_ms(ts: *i64) -> i64
2813func tr_observe_exit(pid: i64, info: *u8) -> i64
2818func tr_reap(pid: i64, status: *i64) -> i64
2826func tr_drain_until(rfd:i64,out:*u8,cap:i64,trunc:*i64,outlen:*i64,deadline:i64)->i64
2829func tr_drain_until_owned(rfd:i64,out:*u8,cap:i64,trunc:*i64,outlen:*i64,deadline:i64,owned:*NxBufOwned,max_bytes:i64)->i64
2882func tr_capture_stop(pid: i64, control: *i64) -> i64
2890func tr_watchdog_child(owner: i64, pid: i64, control: *i64, deadline: i64, wfd: i64, scratch: *u8) -> i64
2911func tr_watchdog_start(owner: i64, pid: i64, control: *i64, deadline: i64) -> i64
2938func tr_run_capture_core(path:*u8,argv:*i64,out:*u8,cap:i64,outlen:*i64,timeout_ms:i64,trunc:*i64,cwd:*u8)->i64
2943func tr_run_capture_owned(path:*u8,argv:*i64,owned:*NxBufOwned,timeout_ms:i64,max_bytes:i64,cwd:*u8)->i64
called by 1: cg_owned calls 1: tr_run_capture_core_owned
2949func tr_run_capture_core_owned(path:*u8,argv:*i64,out:*u8,cap:i64,outlen:*i64,timeout_ms:i64,trunc:*i64,cwd:*u8,owned:*NxBufOwned,max_bytes:i64)->i64
3029func tr_run1(path: *u8, arg: *u8, out: *u8, cap: i64, outlen: *i64) -> i64
3037func tr_run1_to(path: *u8, arg: *u8, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64) -> i64
3045func tr_contains(buf: *u8, n: i64, needle: *u8) -> i64
3086func gv_plan_name_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64
3092func gv_plan_new(names: *u8) -> *i64
3125func gv_plan_take(plan: *i64, name: *u8) -> i64
called by 1: gv_plan_check calls 1: gv_plan_name_eq
3140func gv_plan_complete(plan: *i64) -> i64
called by 1: gv_plan_finish
3150func gv_plan_check(plan: *i64, name: *u8, cond: i64, ctr: *i64) -> i64
3154func gv_plan_finish(plan: *i64, ctr: *i64) -> i64
3178func gv_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
3179func gv_num(v: i64) -> i64
3205func gv_kv(k: *u8, v: i64) -> i64
calls 2: gv_putsgv_num
3223func ce_env_refuse(k: *u8, why: *u8, n: i64, lo: i64, hi: i64, code: i64) -> i64
called by 1: ce_number_envelope calls 2: gv_putsgv_num
3229func ce_number_envelope(k: *u8, v: i64, n: i64, lo: i64, hi: i64, null_v: i64) -> i64
3240func gv_values_head() -> i64
calls 1: gv_puts
3255func gv_check_eq(name: *u8, actual: i64, expected: i64, ctr: *i64) -> i64
3268func gv_check_near(name: *u8, actual: i64, expected: i64, tol: i64, ctr: *i64) -> i64
3281func gv_ctr() -> *i64
called by 1: main calls 1: sys_mmap
3302func gv_need(name: *u8, present: i64, ctr: *i64) -> i64
called by 1: gv_subjects calls 1: gv_puts
3326func gv_subjects(name: *u8, n: i64, ctr: *i64) -> i64
3336func gv_head(title: *u8) -> i64 { gv_puts(title); gv_puts("\n\n" as *u8); return 0 }
calls 1: gv_puts
3338func gv_check(name: *u8, cond: i64, ctr: *i64) -> i64
3355func gv_bite(name: *u8, bad: i64, good: i64, ctr: *i64) -> i64
calls 1: gv_puts
3377func gv_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p }
3378func gv_catn(d: *u8, o: i64, v: i64) -> i64
3398func gv_journal(name: *u8, passed: i64, total: i64, green: i64) -> i64
3449func gv_note_bare_rate(note: *u8) -> i64
3465func gv_verdict(name: *u8, ctr: *i64, note: *u8) -> i64
3629func gv_isqrt(v: i64) -> i64
called by 1: gv_wilson_permil
3643func gv_wilson_permil(k: i64, n: i64, z_micro: i64, out: *i64) -> i64
called by 1: gv_envelope calls 1: gv_isqrt
3666func gv_rng_next(state: *i64) -> i64
called by 1: gv_boot_hier
3678func gv_boot_hier(ck: *i64, cn: *i64, nc: i64, b: i64, seed: i64, out: *i64) -> i64
3740func gv_envelope(k: i64, n: i64, ck: *i64, cn: *i64, nc: i64, z_micro: i64, b: i64, seed: i64, width_target: i64, out: *i64) -> i64
3799func gv_envelope_width_ok(out: *i64) -> i64
3806func gv_env_pair(a: i64, b: i64) -> i64
called by 1: gv_envelope_print calls 2: gv_putsgv_num
3812func gv_envelope_print(label: *u8, out: *i64, harness: *u8) -> i64
3839func gv_envelope_json(d: *u8, o0: i64, out: *i64, harness: *u8) -> i64
3869func gv_at(buf: *u8, n: i64, at: i64, lit: *u8) -> i64
3880func gv_obj_has_n(buf: *u8, n: i64, at: i64) -> i64
called by 1: gv_bare_rate calls 1: gv_at
3905func gv_bare_rate(buf: *u8, n: i64) -> i64
called by 1: gv_note_bare_rate calls 2: gv_atgv_obj_has_n
3935func gv_envelope_comparable(ha: *u8, hb: *u8) -> i64
calls 1: gv_at
3953func gv_envelope_check(name: *u8, out: *i64, harness: *u8, ctr: *i64) -> i64
3960func cg_owned(mode:*u8,b:*NxBufOwned,limit:i64,tmo:i64)->i64
3965func main()->i64