code wiki / _hdl_build / nx_dr_schedule.nx

nx_dr_schedule.nx

buildroot/runtime/_hdl_build/nx_dr_schedule.nx

3686 B57 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_schedule.nx -- CAP-DR-SCHEDULE: schedule-due policy for AUTOMATED periodic backup (the "don't rely on a human to remember" S-class practice). sc_is_due(last_run, interval, now): due iff never-run (last_run==0) OR now >= last_run+interval. check <schedule-conf> <now_epoch>: per job (name<TAB>interval_sec<TAB>last_run_epoch) report DUE / waiting. Pure integer, deterministic (now passed in, so gateable + reproducible). Composes with the supervisor / nx_cron for the actual trigger -- this is the DECISION, not the timer. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_site_lock_lib.nx nx_dr_schedule.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_site_lock_lib.nx

imported by: nobody (leaf or entry point)

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

main sc_w sys_write sys_exit sc_atoi sys_mmap sc_read sys_openat_rd sys_read sys_close sc_wn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap slk_line_end sc_field sys_mmap ↻ slk_field sc_is_due

structs

none

consts

9const K_MAGIC_262144: i64 = 262144

functions

11func sc_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
16func sc_wn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
17func sc_read(path: *u8, out: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
23func sc_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8) { if s[i]>=(48 as u8) { if s[i]<=(57 as u8) { v=v*10+((s[i] as i64)-48) } } i=i+1 } return v }
called by 1: main
24func sc_field(reg: *u8, ls: i64, le: i64, f: i64, out: *u8, cap: i64) -> i64
called by 1: main calls 2: sys_mmapslk_field
30func sc_is_due(last_run: i64, interval: i64, now: i64) -> i64
called by 1: main
36func main(argc: i64, argv: *i64) -> i64