nx_fcntl.nx
buildroot/runtime/nx_fcntl.nx
about
nx_fcntl.nx -- fcntl(2) + open-flag constants.
The existing fs.nx + sys_openat in syscalls.nx open files with
minimal flag awareness. Real callers need to pick read/write/
create/append/truncate/sync/cloexec semantics, set close-on-exec
on existing fds, mark fds nonblocking, query / change file
descriptor flags.
This module provides the constants + a thin wrapper around the
fcntl(2) syscall (number 25 on RV64).
Pairs with fs.nx + nx_proc (so children don't inherit
FD_CLOEXEC fds across exec).
dependencies 1 imports · 23 importers
diagram shows first 10 each side; +0 more imports, +13 more importers in the complete lists below.
imports: syscalls.nx
imported by: _si_walk_probe.nxnx_bundle_gen.nxnx_connect.nxnx_connect_gate.nxnx_corpus_to_meta.nxnx_dedup_audit.nxnx_dir.nxnx_dirent.nxnx_emit_journal.nxnx_fcntl_probe.nxnx_fcntlprobe.nxnx_gate_baseline_sweep.nxnx_gate_mutation_sweep.nxnx_macroprobe.nxnx_pipe.nxnx_primitive_synth.nxnx_sensor_gap_census.nxnx_sovereign_format_census.nxnx_substrate_diagram.nxnx_substrate_diagram_ascii.nxnx_substrate_evolve.nxnx_template_instantiate.nxnx_wall_scan_native.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 24 | const NX_O_RDONLY: i64 = 0x0 |
| 25 | const NX_O_WRONLY: i64 = 0x1 |
| 26 | const NX_O_RDWR: i64 = 0x2 |
| 27 | const NX_O_CREAT: i64 = 0x40 |
| 28 | const NX_O_EXCL: i64 = 0x80 |
| 29 | const NX_O_TRUNC: i64 = 0x200 |
| 30 | const NX_O_APPEND: i64 = 0x400 |
| 31 | const NX_O_NONBLOCK: i64 = 0x800 |
| 32 | const NX_O_SYNC: i64 = 0x101000 |
| 33 | const NX_O_DIRECTORY: i64 = 0x10000 |
| 34 | const NX_O_CLOEXEC: i64 = 0x80000 |
| 37 | const NX_F_DUPFD: i64 = 0 |
| 38 | const NX_F_GETFD: i64 = 1 |
| 39 | const NX_F_SETFD: i64 = 2 |
| 40 | const NX_F_GETFL: i64 = 3 |
| 41 | const NX_F_SETFL: i64 = 4 |
| 42 | const NX_F_DUPFD_CLOEXEC: i64 = 1030 |
| 45 | const NX_FD_CLOEXEC: i64 = 1 |
| 51 | const NX_AT_FDCWD: i64 = 0xFFFFFFFFFFFFFF9C |
| 59 | const NX_SYS_FCNTL: i64 = 72 |
| 60 | const NX_SYS_OPENAT: i64 = 257 |
| 61 | const NX_SYS_DUP: i64 = 32 |
| 62 | const NX_SYS_DUP3: i64 = 292 |
| 75 | const NX_SYS_FCNTL: i64 = 72 |
| 76 | const NX_SYS_OPENAT: i64 = 56 |
| 77 | const NX_SYS_DUP: i64 = 23 |
| 78 | const NX_SYS_DUP3: i64 = 24 |
functions
| 82 | func nx_fcntl(fd: i64, cmd: i64, arg: i64) -> i64 |
| 87 | func nx_fcntl_set_cloexec(fd: i64) -> i64 calls 1: nx_fcntl |
| 94 | func nx_fcntl_set_nonblock(fd: i64) -> i64 calls 1: nx_fcntl |
| 101 | func nx_dup(oldfd: i64) -> i64 called by 1: main |
| 107 | func nx_dup3(oldfd: i64, newfd: i64, flags: i64) -> i64 |
| 114 | func nx_openat(dirfd: i64, path: *u8, flags: i64, mode: i64) -> i64 |
| 119 | func nx_open_rd(path: *u8) -> i64 |
| 124 | func nx_open_wr(path: *u8) -> i64 |
| 129 | func nx_open_append(path: *u8) -> i64 calls 1: nx_openat |
| 135 | func main() -> i64 |