nx_surface_boundary_expanded_t207.nx
buildroot/runtime/nx_surface_boundary_expanded_t207.nx
about
nx_quicksort.nx -- Hoare quicksort (in-place, last-element pivot).
Canonical: this is the substrate-wide canonical quicksort per
[[feedback-no-tool-proliferation-bit-level]]. Other primitives
needing quicksort MUST `import "nx_quicksort.nx"` and compose;
re-implementing inline is refused per the cardinal. nx_qsort.nx +
nx_quickselect.nx may carry distinct semantics (selection vs sort)
but MUST declare "Distinct from [[nx_quicksort.nx]] because: ..."
in their headers.
genealogy_id: hoare_1961_quicksort
lineage_id: in_place_comparison_sort
references: Hoare 'Quicksort' CACM 4(7):321, 1961.
Sedgewick 1978 implementation analysis.
license: public_domain
complexity: avg O(n log n), worst O(n^2).
Tier discipline (no bare i64 in API surface):
- elements: *nx_int (swappable via nx_tier.nx)
- indices: nx_idx (platform-pointer-width)
- status: nx_int (small value; not platform-mandated i64)
The only place `i64` appears in NishiLang source is the entrypoint
main() return, where the kernel exit syscall ABI mandates 64-bit.
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
structs
| none |
consts
| 243 | const NX_BUF_TINY: nx_size = 64 |
| 244 | const NX_BUF_SMALL: nx_size = 256 |
| 245 | const NX_BUF_MEDIUM: nx_size = 4096 |
| 246 | const NX_BUF_LARGE: nx_size = 65536 |
| 247 | const NX_BUF_HUGE: nx_size = 1048576 |
| 251 | const NX_TIER_MCU: nx_int = 0 |
| 252 | const NX_TIER_SOVEREIGN_CHIP: nx_int = 1 |
| 253 | const NX_TIER_FAMILY_DEVICE: nx_int = 2 |
| 254 | const NX_TIER_WORKSTATION: nx_int = 3 |
| 255 | const NX_TIER_SERVER: nx_int = 4 |
| 256 | const NX_TIER_HPC: nx_int = 5 |
| 260 | const NX_NUM_N0_I32: nx_int = 0 |
| 261 | const NX_NUM_N1_I64: nx_int = 1 |
| 262 | const NX_NUM_N2_I128: nx_int = 2 |
| 263 | const NX_NUM_N3_I256: nx_int = 3 |
| 264 | const NX_NUM_N4_I512: nx_int = 4 |
| 265 | const NX_NUM_N5_BIGINT: nx_int = 5 |
| 273 | const NX_SIZEOF_NX_INT: nx_size = 8 // nx_int currently i64 -> 8 bytes |
| 274 | const NX_SIZEOF_NX_SIZE: nx_size = 8 // nx_size always pointer-width |
| 275 | const NX_SIZEOF_NX_IDX: nx_size = 8 // nx_idx alias of nx_size |
| 279 | const NX_FD_STDIN: nx_fd = 0 |
| 280 | const NX_FD_STDOUT: nx_fd = 1 |
| 281 | const NX_FD_STDERR: nx_fd = 2 |
| 283 | const SYS_MAGIC_1024: i64 = 1024 |
| 284 | const SYS_MAGIC_1000000: i64 = 1000000 |
| 285 | const SYS_MAGIC_4294967296: i64 = 4294967296 |
| 287 | const SYS_READ_GROW_INIT: i64 = 65536 |
| 288 | const SYS_MAGIC_100000: i64 = 100000 |
| 306 | const SYS_READ: i64 = 0 |
| 307 | const SYS_WRITE: i64 = 1 |
| 308 | const SYS_CLOSE: i64 = 3 |
| 309 | const SYS_LSEEK: i64 = 8 |
| 310 | const SYS_OPENAT: i64 = 257 |
| 311 | const SYS_EXIT: i64 = 60 |
| 312 | const SYS_MMAP: i64 = 9 |
| 313 | const SYS_CLOCK_GETTIME: i64 = 228 |
| 314 | const SYS_IOCTL: i64 = 16 |
| 315 | const SYS_CLOCK_NANOSLEEP: i64 = 230 |
| 319 | const SYS_CHROOT: i64 = 161 |
| 320 | const SYS_MOUNT: i64 = 165 |
| 321 | const SYS_UNSHARE: i64 = 272 |
| 322 | const SYS_GETUID: i64 = 102 |
| 323 | const SYS_GETGID: i64 = 104 |
| 324 | const SYS_POLL: i64 = 7 |
| 328 | const SYS_READ: i64 = 63 |
| 329 | const SYS_WRITE: i64 = 64 |
| 330 | const SYS_CLOSE: i64 = 57 |
| 331 | const SYS_LSEEK: i64 = 62 |
| 332 | const SYS_OPENAT: i64 = 56 |
| 333 | const SYS_EXIT: i64 = 93 |
| 334 | const SYS_MMAP: i64 = 222 |
| 335 | const SYS_CLOCK_GETTIME: i64 = 113 |
| 336 | const SYS_IOCTL: i64 = 29 |
| 337 | const SYS_CLOCK_NANOSLEEP: i64 = 115 |
| 344 | const SYS_CHROOT: i64 = 51 |
| 345 | const SYS_MOUNT: i64 = 40 |
| 346 | const SYS_UNSHARE: i64 = 97 |
| 347 | const SYS_GETUID: i64 = 174 |
| 348 | const SYS_GETGID: i64 = 176 |
| 349 | const SYS_POLL: i64 = 73 |
| 407 | const SYS_PATH_MAX: i64 = 4096 // Linux PATH_MAX; getcwd returns -ERANGE below it |
| 411 | const MODE_0755: i64 = 0x1ed // rwxr-xr-x : default mode for a created directory |
| 426 | const AT_FDCWD: i64 = -100 |
| 531 | const NX_MO_RELAXED: i64 = 0 |
| 532 | const NX_MO_CONSUME: i64 = 1 |
| 533 | const NX_MO_ACQUIRE: i64 = 2 |
| 534 | const NX_MO_RELEASE: i64 = 3 |
| 535 | const NX_MO_ACQ_REL: i64 = 4 |
| 536 | const NX_MO_SEQ_CST: i64 = 5 |
| 538 | const NXA_SMALL_MAX: i64 = 256 |
| 539 | const NXA_CHUNK: i64 = 262144 |
| 540 | const NXA_ALIGN: i64 = 16 |
| 541 | const NXA_GAP: i64 = 16 |
| 542 | const NXA_STATE: i64 = 4096 |
| 548 | const NXA_RING: i64 = 128 |
| 549 | const NXA_RBASE: i64 = 64 |
| 584 | const NXA_LOCK: i64 = 4 |
| 592 | const NXA_LOCK_WARN: i64 = NXA_RING * 8 |
| 596 | const NXA_LOCK_WARNED: i64 = 5 |
| 598 | const NXA_CHUNKBASE: i64 = 320 |
| 599 | const NXA_CHUNKMAX: i64 = 192 |
| 620 | const NXA_MAP_INVALID:i64=0-22 // Linux EINVAL, a protocol value rather than a resource budget. |
| 672 | const SYS_STATFS_X86_MEASURED: i64 = 137 |
| 673 | const STATFS_BUF_BYTES: i64 = 144 |
| 674 | const STATFS_I_BSIZE: i64 = 1 |
| 675 | const STATFS_I_BLOCKS: i64 = 2 |
| 676 | const STATFS_I_BAVAIL: i64 = 4 |
| 677 | const STATFS_PERMIL: i64 = 1000 |
| 678 | const STATFS_ERR: i64 = 0 - 1 |
| 1023 | const O_RDONLY: i64 = 0 |
| 1024 | const O_WRONLY_CT: i64 = 0x241 // O_CREAT | O_WRONLY | O_TRUNC |
| 1025 | const O_WRONLY_CA: i64 = 0x441 // O_CREAT | O_WRONLY | O_APPEND |
| 1033 | const O_RDWR_CREATE: i64 = 0x42 |
| 1054 | const MODE_0644: i64 = 0x1a4 // rw-r--r-- : default mode for a generated artifact |
| 1059 | const MODE_0755: i64 = 0x1ed |
| 1072 | const ACCEPT_TMO_S: i64 = 30 |
| 1079 | const O_WRONLY_CREATE_EXCLUSIVE: i64 = 0x1 | 0x40 | 0x80 |
| 1085 | const O_DIRECTORY: i64 = 0x10000 |
| 1099 | const O_CLOEXEC: i64 = 0x80000 |
| 1100 | const O_NOFOLLOW: i64 = 0x20000 |
| 1101 | const O_NONBLOCK: i64 = 0x800 |
| 1102 | const MODE_0600: i64 = 0x180 |
| 1167 | const SYS_LOCK_SH: i64 = 1 |
| 1168 | const SYS_LOCK_EX: i64 = 2 |
| 1169 | const SYS_LOCK_NB: i64 = 4 |
| 1170 | const SYS_LOCK_UN: i64 = 8 |
| 1215 | const SYS_SETPGID: i64 = 109 |
| 1218 | const SYS_SETPGID: i64 = 154 |
| 1241 | const RLIMIT_CPU: i64 = 0 |
| 1242 | const RLIMIT_AS: i64 = 9 |
| 1243 | const WNOHANG: i64 = 1 |
| 1337 | const SYS_CLONE: i64 = 56 |
| 1338 | const SYS_EXECVE: i64 = 59 |
| 1339 | const SYS_WAIT4: i64 = 61 |
| 1340 | const SYS_PIPE2: i64 = 293 |
| 1341 | const SYS_DUP3: i64 = 292 |
| 1345 | const SYS_CLONE: i64 = 220 |
| 1346 | const SYS_EXECVE: i64 = 221 |
| 1347 | const SYS_WAIT4: i64 = 260 |
| 1348 | const SYS_PIPE2: i64 = 59 |
| 1349 | const SYS_DUP3: i64 = 24 |
| 1355 | const CLONE_VM: i64 = 0x00000100 |
| 1356 | const CLONE_VFORK: i64 = 0x00004000 |
| 1357 | const SIGCHLD: i64 = 17 |
| 1407 | const NX_SYS_PRCTL: i64 = 167 |
| 1408 | const NX_PR_SET_PDEATHSIG: i64 = 1 |
| 1409 | const NX_PR_SET_CHILD_SUBREAPER: i64 = 36 |
| 1424 | const SYS_WAITID_PORTABLE: i64 = 95 |
| 1425 | const NX_WAIT_P_PID: i64 = 1 |
| 1426 | const NX_WAIT_EXITED: i64 = 4 |
| 1427 | const NX_WAIT_NOWAIT: i64 = 0x01000000 |
| 1428 | const NX_WAIT_SIGINFO_BYTES: i64 = 128 |
| 1435 | const NX_FD_DENT_BUFFER: i64 = 4096 |
| 1436 | const NX_SYS_CLOSE_RANGE: i64 = 436 // Linux x86_64 and asm-generic ABI |
| 1437 | const NX_FD_UINT_MAX: i64 = 4294967295 |
| 1609 | const SYS_GETDENTS64: i64 = 217 |
| 1612 | const SYS_GETDENTS64: i64 = 61 |
| 1615 | const DT_UNKNOWN: i64 = 0 |
| 1616 | const DT_FIFO: i64 = 1 |
| 1617 | const DT_CHR: i64 = 2 |
| 1618 | const DT_DIR: i64 = 4 |
| 1619 | const DT_BLK: i64 = 6 |
| 1620 | const DT_REG: i64 = 8 |
| 1621 | const DT_LNK: i64 = 10 |
| 1622 | const DT_SOCK: i64 = 12 |
| 1810 | const SYS_SOCKET: i64 = 41 |
| 1811 | const SYS_BIND: i64 = 49 |
| 1812 | const SYS_LISTEN: i64 = 50 |
| 1813 | const SYS_ACCEPT: i64 = 43 |
| 1814 | const SYS_CONNECT: i64 = 42 |
| 1815 | const SYS_SETSOCKOPT: i64 = 54 |
| 1816 | const SYS_SENDTO: i64 = 44 |
| 1817 | const SYS_RECVFROM: i64 = 45 |
| 1818 | const SYS_SHUTDOWN: i64 = 48 |
| 1822 | const SYS_SOCKET: i64 = 198 |
| 1823 | const SYS_BIND: i64 = 200 |
| 1824 | const SYS_LISTEN: i64 = 201 |
| 1825 | const SYS_ACCEPT: i64 = 202 |
| 1826 | const SYS_CONNECT: i64 = 203 |
| 1827 | const SYS_SETSOCKOPT: i64 = 208 |
| 1828 | const SYS_SENDTO: i64 = 206 |
| 1829 | const SYS_RECVFROM: i64 = 207 |
| 1830 | const SYS_SHUTDOWN: i64 = 210 |
| 1834 | const SOL_SOCKET: i64 = 1 |
| 1835 | const SO_REUSEADDR: i64 = 2 |
| 1840 | const SO_SNDTIMEO: i64 = 21 |
| 1841 | const SO_RCVTIMEO: i64 = 20 |
| 1869 | const SYS_ALARM: i64 = 37 |
| 1872 | const AF_INET: i64 = 2 |
| 1873 | const SOCK_STREAM: i64 = 1 |
| 1874 | const SOCK_DGRAM: i64 = 2 |
| 1980 | const SYS_SENDMSG: i64 = 46 |
| 1981 | const SYS_RECVMSG: i64 = 47 |
| 1982 | const SYS_SOCKETPAIR: i64 = 53 |
| 1983 | const SCM_AF_UNIX: i64 = 1 |
| 1984 | const SCM_SOL_SOCKET: i64 = 1 |
| 1985 | const SCM_RIGHTS_TYPE: i64 = 1 |
| 1986 | const SCM_MSG_CMSG_CLOEXEC: i64 = 1073741824 |
| 1987 | const SCM_MSGHDR_BYTES: i64 = 56 |
| 1988 | const SCM_MSGHDR_OFF_IOV: i64 = 16 |
| 1989 | const SCM_MSGHDR_OFF_IOVLEN: i64 = 24 |
| 1990 | const SCM_MSGHDR_OFF_CTRL: i64 = 32 |
| 1991 | const SCM_MSGHDR_OFF_CTRLLEN: i64 = 40 |
| 1992 | const SCM_IOVEC_BYTES: i64 = 16 |
| 1993 | const SCM_IOVEC_OFF_BASE: i64 = 0 |
| 1994 | const SCM_IOVEC_OFF_LEN: i64 = 8 |
| 1995 | const SCM_CMSG_OFF_LEN: i64 = 0 |
| 1996 | const SCM_CMSG_OFF_LEVEL: i64 = 8 |
| 1997 | const SCM_CMSG_OFF_TYPE: i64 = 12 |
| 1998 | const SCM_CMSG_OFF_DATA: i64 = 16 |
| 1999 | const SCM_CMSG_LEN_1FD: i64 = 20 |
| 2000 | const SCM_CMSG_SPACE_1FD: i64 = 24 |
| 2001 | const SCM_IOV_COUNT_ONE: i64 = 1 |
| 2002 | const SCM_U32_BYTES: i64 = 4 |
| 2003 | const SCM_BYTE_RADIX: i64 = 256 |
| 2004 | const SCM_FDPAIR_BYTES: i64 = 8 |
| 2007 | const SCM_PAYLOAD_BYTES: i64 = 1 |
| 2008 | const SCM_PAYLOAD_BYTE: i64 = 70 |
| 2012 | const SCM_ERR_NO_CMSG: i64 = 0 - 901 |
| 2013 | const SCM_ERR_CMSG_LEN: i64 = 0 - 902 |
| 2014 | const SCM_ERR_CMSG_LEVEL: i64 = 0 - 903 |
| 2015 | const SCM_ERR_CMSG_TYPE: i64 = 0 - 904 |
| 2087 | const SCM_SUN_PATH_OFF: i64 = 2 // sockaddr_un = [sa_family: u16][sun_path: 108] |
| 2088 | const SCM_SUN_BYTES: i64 = 110 |
| 2089 | const SCM_SUN_PATH_MAX: i64 = 107 |
| 2214 | const NX_FILE_PERMISSION_MASK:i64=511 |
| 2215 | const NX_FILE_DESCRIPTOR_INVALID:i64=0-22 |
| 2221 | const NX_STAT_X64_BYTES:i64=144 |
| 2222 | const NX_STAT_X64_MODE_OFFSET:i64=24 |
| 2223 | const NX_STAT_X64_BLOCK_OFFSET:i64=56 |
| 2224 | const NX_STAT_X64_SIZE_OFFSET:i64=48 |
| 2225 | const NX_STAT_X64_DEVICE_OFFSET:i64=0 |
| 2226 | const NX_STAT_X64_INODE_OFFSET:i64=8 |
| 2227 | const NX_STAT_TYPE_MASK:i64=61440 |
| 2228 | const NX_STAT_REGULAR_FILE:i64=32768 |
| 2279 | const NXA_MAGIC_1000003: i64 = 1000003 |
| 2286 | const NXA_VER: i64 = 1 |
| 2371 | const NGP_COMPONENTS: i64 = 3 // VERT xyz and TRIS corners in the NXA v1 schema. |
| 2372 | const NGP_GPU_WORD: i64 = 4 // WebGPU float32/uint32 wire representation. |
| 2373 | const NGP_U32_MAX: i64 = 4294967295 |
| 2374 | const NGP_E_OUTPUT: i64 = 0-4 |
| 2375 | const NGP_E_INDEX: i64 = 0-5 |
| 2376 | const NGP_E_OVERLAP: i64 = 0-6 |
| 2378 | const NGP_SKIN_INFLUENCES: i64 = 4 // NXA v1: four joint indices, then four Q12 weights. |
| 2379 | const NGP_SKIN_WORDS: i64 = NGP_SKIN_INFLUENCES*2 |
| 2380 | const NGP_SKEL_WORDS: i64 = 8 // NXA v1 parent, bind translation xyz, quaternion xyzw. |
| 2381 | const NGP_WEIGHT_ONE: i64 = 4096 // NXA v1 Q12 weight denominator. |
| 2382 | const NGP_F32_INTEGER_BITS: i64 = 24 // IEEE-754 binary32 significand precision. |
| 2383 | const NGP_E_SKIN_COUNT: i64 = 0-7 |
| 2384 | const NGP_E_SKIN_JOINT: i64 = 0-8 |
| 2385 | const NGP_E_SKIN_WEIGHT: i64 = 0-9 |
| 2386 | const NGP_E_TEXC_SHAPE: i64=0-10 |
| 2387 | const NGP_E_TEXC_VALUE: i64=0-11 |
| 2388 | const NGP_F32_ABS_MASK: i64=2147483647 |
| 2389 | const NGP_F32_SIGN_MASK: i64=2147483648 |
| 2533 | const NGP_TEXC_HEADER: i64=4 // NXA TEXC nv, stride, atlas grid, optional region table offset. |
| 2534 | const NGP_TEXC_STRIDE: i64=3 // u Q16, v Q16, owning joint. |
| 2535 | const NGP_TEXC_UV: i64=2 |
| 2536 | const NGP_TEXC_ONE: i64=65536 |
| 2688 | const NGB_WORD: i64=8 |
| 2689 | const NGB_COORD_LIMIT: i64=1<<NGP_F32_INTEGER_BITS // Exact integer positions in the incumbent float32 upload. |
| 2690 | const NGB_E_POLICY: i64=0-20 |
| 2691 | const NGB_E_COORD: i64=0-21 |
| 2692 | const NGB_E_CANDIDATE: i64=0-22 |
| 2763 | const NGB_CLIP_E_INPUT:i64=-30 |
| 2764 | const NGB_CLIP_E_RANGE:i64=-32 |
| 2765 | const NGB_CLIP_I64_MAX:i64=9223372036854775807 |
| 2793 | const NGB_ATTACH_HDR:i64=12 |
| 2794 | const NGB_ATTACH_REC:i64=8 |
| 2795 | const NGB_ATTACH_COORD_MAX:i64=16777216 |
| 2796 | const NGB_ATTACH_E_SOURCE:i64=-40 |
| 2797 | const NGB_ATTACH_E_SHAPE:i64=-41 |
| 2798 | const NGB_ATTACH_E_GEOMETRY:i64=-42 |
| 2846 | const NGB_PACK_HEADER:i64=64 |
| 2847 | const NGB_PACK_VERTEX:i64=44 |
| 2848 | const NGB_E_PACK_INDEX:i64=-43 |
| 2849 | const NGB_E_PACK_EXTENT:i64=-44 |
| 2896 | const NSA_E_INPUT:i64=-50 |
| 2897 | const NSA_E_RANGE:i64=-51 |
| 2898 | const NSA_E_MISS:i64=-52 |
| 2899 | const NSA_E_AMBIGUOUS:i64=-53 |
| 2977 | const NSA_E_MIXED_SUPPORT:i64=-54 |
| 2992 | const NSA_E_NONMANIFOLD:i64=-55 |
functions
| 352 | func sys_ioctl(fd: i64, request: i64, arg: i64) -> i64 |
| 363 | func sys_poll(fds: *u8, nfds: i64, timeout_ms: i64) -> i64 |
| 369 | func sys_write(fd: i64, buf: *u8, count: i64) -> i64 |
| 373 | func sys_read(fd: i64, buf: *u8, count: i64) -> i64 called by 1: sys_read_file |
| 377 | func sys_close(fd: i64) -> i64 |
| 387 | func sys_chdir(path: *u8) -> i64 calls 1: sys_mmap |
| 412 | func sys_getcwd(buf: *u8, cap: i64) -> i64 calls 1: sys_mmap |
| 431 | func sys_unlinkat(path: *u8) -> i64 |
| 438 | func sys_fchmodat(path: *u8, mode: i64) -> i64 calls 1: sys_mmap |
| 454 | func sys_exit_group(code: i64) -> i64 |
| 471 | func sys_setpriority(prio: i64) -> i64 |
| 479 | func sys_setpriority_of(pid: i64, prio: i64) -> i64 |
| 621 | func sys_munmap_direct(addr:*u8,len:i64)->i64 |
| 626 | func sys_munmap(addr: *u8, len: i64) -> i64 |
| 633 | func sys_lseek(fd: i64, offset: i64, whence: i64) -> i64 |
| 681 | func sys_statfs(path: *u8, buf: *i64) -> i64 |
| 686 | func sys_fs_avail_bytes(path: *u8) -> i64 |
| 695 | func sys_fs_used_permil(path: *u8) -> i64 |
| 704 | func sys_exit(code: i64) -> i64 called by 1: nxa_die |
| 738 | func nxa_dump_printable(src: i64, n: i64) -> i64 |
| 759 | func nxa_dump_sizes() -> i64 |
| 784 | func nxa_report_overrun(sz: i64, gs: i64) -> i64 |
| 814 | func nxa_die(msg: *u8) -> i64 |
| 824 | func nxa_lock_addr() -> *i64 |
| 832 | func nxa_lock_take() -> i64 |
| 861 | func nxa_lock_give() -> i64 |
| 875 | func sys_mmap_try(size:i64)->*u8 called by 1: main |
| 882 | func sys_mmap(size: i64) -> *u8 |
| 964 | func sys_arena_mark() -> i64 calls 1: sys_mmap |
| 978 | func sys_arena_reset() -> i64 |
| 1002 | func sys_mmap_shared(size: i64) -> *u8 |
| 1016 | func sys_madvise(addr: *u8, len: i64, advice: i64) -> i64 |
| 1027 | func sys_openat_rd(path: *u8) -> i64 |
| 1034 | func sys_openat_rdwr(path: *u8, mode: i64) -> i64 |
| 1073 | func sys_openat_wr(path: *u8, mode: i64) -> i64 |
| 1080 | func sys_openat_exclusive(path: *u8, mode: i64) -> i64 |
| 1086 | func sys_openat_directory(path: *u8) -> i64 |
| 1093 | func sys_openat_append(path: *u8, mode: i64) -> i64 |
| 1103 | func sys_openat_lock(path: *u8) -> i64 |
| 1111 | func sys_symlinkat(target: *u8, linkpath: *u8) -> i64 |
| 1123 | func sys_readlinkat(path: *u8, buf: *u8, cap: i64) -> i64 |
| 1140 | func sys_renameat(oldpath: *u8, newpath: *u8) -> i64 |
| 1153 | func sys_fsync(fd: i64) -> i64 |
| 1171 | func sys_flock(fd: i64, op: i64) -> i64 |
| 1179 | func sys_fstatat(path: *u8, statbuf: *u8) -> i64 |
| 1186 | func sys_utimensat(path: *u8, times: *i64) -> i64 |
| 1205 | func nx_kill(pid: i64, sig: i64) -> i64 { return __syscall(129, pid, sig, 0, 0, 0, 0) } |
| 1220 | func sys_setpgid(pid: i64, pgid: i64) -> i64 { return __syscall(SYS_SETPGID, pid, pgid, 0, 0, 0, 0) } |
| 1234 | func nx_prlimit(pid: i64, resource: i64, new_limit: *u8, old_limit: *u8) -> i64 |
| 1246 | func sys_mkdir(path: *u8, mode: i64) -> i64 { return __syscall(34, AT_FDCWD, path, mode, 0, 0, 0) } |
| 1249 | func nx_chmod(path: *u8, mode: i64) -> i64 { return __syscall(53, AT_FDCWD, path, mode, 0, 0, 0) } |
| 1253 | func nx_setsid() -> i64 { return __syscall(112, 0, 0, 0, 0, 0, 0) } |
| 1257 | func sys_clock_gettime_mono(ts: *i64) -> i64 |
| 1265 | func sys_clock_gettime_real(ts: *i64) -> i64 |
| 1270 | func sys_now_realtime_sec() -> i64 |
| 1277 | func sys_now_realtime_ms() -> i64 |
| 1289 | func sys_now_realtime_us() -> i64 |
| 1298 | func sys_now_ms() -> i64 |
| 1309 | func sys_now_us() -> i64 |
| 1320 | func sys_clock_now_us() -> i64 calls 1: sys_now_us |
| 1370 | func sys_unshare(flags: i64) -> i64 |
| 1373 | func sys_mount(source: *u8, target: *u8, fs_type: *u8, mountflags: i64, data: *u8) -> i64 |
| 1376 | func sys_chroot(path: *u8) -> i64 |
| 1379 | func sys_getuid() -> i64 |
| 1382 | func sys_getgid() -> i64 |
| 1386 | func sys_fork() -> i64 |
| 1410 | func sys_prctl(option: i64, arg: i64) -> i64 called by 1: sys_bind_parent_lifetime |
| 1413 | func sys_bind_parent_lifetime(expected_parent: i64, signal: i64) -> i64 calls 1: sys_prctl |
| 1429 | func sys_waitid(idtype: i64, id: i64, info: *u8, options: i64) -> i64 |
| 1438 | func sys_close_inherited_proc(first: i64) -> i64 called by 1: sys_close_inherited calls 6: sys_openat_rdsys_mmapsys_getdents64dirent_reclensys_closesys_munmap |
| 1479 | func sys_close_inherited(first: i64) -> i64 |
| 1485 | func sys_execve_clean(path: *u8, argv: *i64, envp: *i64) -> i64 |
| 1491 | func sys_execve(path: *u8, argv: *i64, envp: *i64) -> i64 called by 1: sys_execve_clean |
| 1500 | func sys_wait4(pid: i64, status: *i64, options: i64) -> i64 |
| 1506 | func wait_exit_code(status: i64) -> i64 called by 1: wait_status_rc |
| 1514 | func wait_term_signal(status: i64) -> i64 called by 1: wait_status_rc |
| 1539 | func wait_status_rc(status: i64) -> i64 |
| 1562 | func sys_default_signal(sig: i64) -> i64 calls 1: sys_mmap |
| 1571 | func sys_ignore_sigpipe() -> i64 calls 1: sys_mmap |
| 1586 | func sys_pipe2(fds: *i64, flags: i64) -> i64 |
| 1592 | func sys_dup3(oldfd: i64, newfd: i64, flags: i64) -> i64 |
| 1626 | func sys_getdents64(fd: i64, buf: *u8, buf_len: i64) -> i64 called by 1: sys_close_inherited_proc |
| 1632 | func dirent_reclen(rec: *u8) -> i64 called by 1: sys_close_inherited_proc |
| 1639 | func dirent_type(rec: *u8) -> i64 |
| 1644 | func dirent_name(rec: *u8) -> *u8 |
| 1651 | func sys_read_file(path: *u8, out_len: *i64) -> *u8 |
| 1733 | func sys_free_file(buf: *u8, len: i64) -> i64 calls 1: sys_munmap |
| 1744 | func sys_map_file(path: *u8, out_len: *i64) -> *u8 |
| 1762 | func sys_sleep_ms(ms: i64) -> i64 |
| 1846 | func sys_setsockopt(fd: i64, level: i64, optname: i64, called by 1: sys_set_socket_timeout |
| 1856 | func sys_set_socket_timeout(fd: i64, secs: i64) -> i64 |
| 1870 | func sys_alarm(secs: i64) -> i64 { return __syscall(SYS_ALARM, secs, 0, 0, 0, 0, 0) } |
| 1876 | func sys_socket(domain: i64, sock_type: i64, protocol: i64) -> i64 |
| 1888 | func sockaddr_in_init(addr: *u8, port: i64) -> i64 |
| 1911 | func sys_bind(fd: i64, addr: *u8, addr_len: i64) -> i64 called by 1: sys_unix_listen |
| 1914 | func sys_listen(fd: i64, backlog: i64) -> i64 called by 1: sys_unix_listen |
| 1921 | func sys_accept(fd: i64) -> i64 |
| 1924 | func sys_accept_with_addr(fd: i64, addr: *u8, addr_len: *i64) -> i64 |
| 1928 | func sys_shutdown(fd: i64, how: i64) -> i64 |
| 1931 | func sys_connect(fd: i64, addr: *u8, addr_len: i64) -> i64 called by 1: sys_unix_connect_fd |
| 1934 | func sys_sendto(fd: i64, buf: *u8, n: i64, flags: i64, |
| 1938 | func sys_recvfrom(fd: i64, buf: *u8, n: i64, flags: i64, |
| 2017 | func scm_zero(base: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { base[i] = 0; i = i + 1 } return 0 } |
| 2018 | func scm_put_i64(base: *u8, off: i64, v: i64) -> i64 |
| 2023 | func scm_get_i64(base: *u8, off: i64) -> i64 called by 1: sys_recv_fd |
| 2030 | func scm_put_u32(base: *u8, off: i64, v: i64) -> i64 called by 1: sys_send_fd |
| 2040 | func scm_get_u32(base: *u8, off: i64) -> i64 called by 1: sys_recv_fd |
| 2052 | func sys_sendmsg(fd: i64, msg: *u8, flags: i64) -> i64 called by 1: sys_send_fd |
| 2055 | func sys_recvmsg(fd: i64, msg: *u8, flags: i64) -> i64 called by 1: sys_recv_fd |
| 2079 | func sys_socketpair(domain: i64, sock_type: i64, protocol: i64, sv: *u8) -> i64 |
| 2090 | func sys_unix_listen(path: *u8, backlog: i64) -> i64 |
| 2118 | func sys_unix_connect_fd(path: *u8) -> i64 |
| 2142 | func sys_send_fd(sock: i64, fd: i64) -> i64 |
| 2176 | func sys_recv_fd(sock: i64, flags: i64) -> i64 |
| 2216 | func sys_fchmod_fd(fd:i64,mode:i64)->i64 |
| 2229 | func sys_fstat_fd(fd:i64,stat:*u8)->i64 |
| 2233 | func sys_stat_permissions(stat:*u8)->i64 |
| 2240 | func nx_quicksort_partition(arr: *nx_int, lo: nx_idx, hi: nx_idx) -> nx_idx called by 1: nx_quicksort_recur |
| 2259 | func nx_quicksort_recur(arr: *nx_int, lo: nx_idx, hi: nx_idx) -> nx_int |
| 2269 | func nx_quicksort(arr: *nx_int, n: nx_idx) -> nx_int |
| 2289 | func nxa_magic() -> i64 called by 1: nxa_section_entry |
| 2297 | func nxa_tag4(s: *u8) -> i64 |
| 2302 | func nxa_check2(seed: i64, w: *i64, nw: i64) -> i64 called by 1: nxa_section_entry |
| 2311 | func nxa_section_entry(b: *u8, flen: i64, tag: i64) -> i64 |
| 2345 | func nxa_find(b: *u8,flen: i64,tag: i64) -> i64 calls 1: nxa_section_entry |
| 2354 | func nxa_counted_section(b: *u8,flen: i64,tag: i64,stride: i64) -> i64 |
| 2391 | func ngp_reason(rc: i64) -> *u8 |
| 2405 | func ngp_section(b: *u8,n: i64,tag: *u8) -> i64 |
| 2408 | func ngp_bytes(b: *u8,n: i64,tag: *u8) -> i64 calls 1: ngp_section |
| 2415 | func ngp_output(b: *u8,n: i64,out: *u8,cap: i64,need: i64) -> i64 |
| 2428 | func ngp_vertices(b: *u8,n: i64,out: *u8,cap: i64) -> i64 |
| 2441 | func ngp_indices(b: *u8,n: i64,out: *u8,cap: i64) -> i64 |
| 2468 | func ngp_skin_section(b: *u8,n: i64) -> i64 |
| 2500 | func ngp_skin_bytes(b: *u8,n: i64) -> i64 calls 1: ngp_skin_section |
| 2508 | func ngp_skin(b: *u8,n: i64,out: *u8,cap: i64) -> i64 |
| 2539 | func ngp_texcoord_section(b: *u8,n: i64) -> i64 called by 2: ngp_texcoord_bytesngp_texcoords calls 4: ngp_sectionnxa_counted_sectionnxa_tag4nxa_section_entry |
| 2566 | func ngp_texcoord_bytes(b: *u8,n: i64) -> i64 calls 1: ngp_texcoord_section |
| 2572 | func ngp_texcoords(b: *u8,n: i64,out: *u8,cap: i64) -> i64 |
| 2597 | func ngp_normal_length(square: i64) -> i64 called by 1: ngp_normals |
| 2608 | func ngp_normal_edge(h: *i64,va: i64,a: i64,b: i64,k: i64,scale: i64) -> i64 |
| 2613 | func ngp_float_difference(a: i64,b: i64) -> i64 { return __f32_add(a,b^NGP_F32_SIGN_MASK) } |
| 2616 | func ngp_normals(b: *u8,n: i64,out: *u8,cap: i64) -> i64 |
| 2694 | func ngb_coordinates(h: *i64,at: i64) -> i64 called by 1: ngb_map |
| 2707 | func ngb_map(b: *u8,n: i64,out: *u8,cap: i64,step: i64,lower_band: i64) -> i64 |
| 2766 | func ngb_abs(x:i64)->i64{if x<0{return 0-x};return x} |
| 2767 | func ngb_clip_product(a:i64,b:i64)->i64 |
| 2770 | func ngb_clip_gcd(a:i64,b:i64)->i64 {var x:i64=a;var y:i64=b;while y>0{let z:i64=x%y;x=y;y=z};return x} |
| 2775 | func ngb_clip_area_ratio_v1(poly:*i64,n:i64,result:*i64)->i64 |
| 2800 | func ngb_attach_source_v1(b:*u8,n:i64)->i64 |
| 2808 | func ngb_attach_face_v1(pos:*i64,idx:*i64,face:i64)->i64 called by 1: ngb_attach_validate_v1 |
| 2816 | func ngb_attach_validate_v1(b:*u8,n:i64,s:*i64,nw:i64,work:*i64,work_words:i64)->i64 |
| 2851 | func ngb_source_index_f32_v1(v:i64,nv:i64)->i64 called by 1: ngb_attachment_bytes_v1 |
| 2858 | func ngb_attachment_bytes_v1(b:*u8,n:i64,work:*i64,work_bytes:i64)->i64 |
| 2876 | func ngb_attachment_pack_v1(b:*u8,n:i64,out:*u8,cap:i64,work:*i64,work_bytes:i64)->i64 |
| 2901 | func nsa_unsigned_ratio_cmp(a:i64,b:i64,c:i64,d:i64)->i64 called by 1: nsa_ratio_cmp |
| 2908 | func nsa_ratio_cmp(a:i64,b:i64,c:i64,d:i64)->i64 |
| 2914 | func nsa_triangle_y_v1(p:*i64,idx:*i64,face:i64,qx:i64,qz:i64,result:*i64)->i64 |
| 2930 | func nsa_landmark_y_v1(b:*u8,n:i64,qx:i64,qz:i64,direction:i64,out:*i64,cap:i64,work:*i64,words:i64)->i64 |
| 2942 | func nsa_landmark_mesh_y_v1(p:*i64,idx:*i64,nt:i64,qx:i64,qz:i64,direction:i64,out:*i64,work:*i64)->i64 |
| 2955 | func nsa_component_root_v1(labels:*i64,v:i64)->i64 |
| 2959 | func nsa_component_join_v1(labels:*i64,a:i64,b:i64)->i64 |
| 2965 | func nsa_component_labels_v1(b:*u8,n:i64,labels:*i64,capacity:i64)->i64 |
| 2980 | func nsa_rigid_component_joint_v1(b:*u8,n:i64,seed:i64,labels:*i64,capacity:i64)->i64 |
| 2993 | func nsa_component_boundary_v1(b:*u8,n:i64,seed:i64,labels:*i64,label_words:i64,work:*i64,work_words:i64,out:*i64,out_words:i64)->i64 called by 1: main calls 7: ngb_attach_source_v1nxa_counted_sectionnxa_tag4ngb_clip_productngp_outputnsa_component_labels_v1+1 |
| 3012 | func sa_put(s:*u8)->i64{var n:i64=0;while s[n]!=0{n=n+1};return sys_write(1,s,n)} |
| 3013 | func sa_num(x:i64)->i64{let p:*u8=sys_mmap(32) as *u8;if (p as i64)<=0{return -1};var n:i64=x;var i:i64=31;if n<0{sa_put("-");n=0-n};p[i]=0;i=i-1;if n==0{p[i]=48;i=i-1};while n>0{p[i]=(48+n%10) as u8;n=n/10;i=i-1};sa_put(((p as i64)+i+1) as *u8);return sys_munmap(p,32)} |
| 3014 | func sa_check(ok:i64,name:*u8,c:*i64)->i64{c[0]=c[0]+1;if ok==1{sa_put("PASS ")}else{sa_put("FAIL ");c[1]=c[1]+1};sa_put(name);sa_put(" |
| 3017 | func main(argc:i64,argv:*i64)->i64 |