code wiki / _hdl_build / nx_ws_exceed_git_live_gate.nx
nx_ws_exceed_git_live_gate.nx
buildroot/runtime/_hdl_build/nx_ws_exceed_git_live_gate.nx
dependencies 5 imports · 0 importers
imports: nx_gate_base.nxnx_ws_cas.nxnx_workstream_store.nxnx_seg_store.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 19 | const GH_GIT: *u8 = "/usr/bin/git" |
| 20 | const GH_N: i64 = 12 // concurrent workers |
| 21 | const GH_K: i64 = 12 // writes per worker -> 144 total each lane (mirrors nx_ws_cas_gate) |
functions
| 23 | func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" calls 1: gw |
| 25 | func gn(v0: i64) -> i64 { var v: i64=v0; if v<0 { sys_write(1,"-" as *u8,1); v=0-v } let t: *u8=sys_mmap(28); var k: i64=0; if v==0{t[0]=48 as u8;k=1} while v>0{t[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let b: *u8=sys_mmap(28); var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } |
| 26 | func gcat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){ dst[o]=s[i]; o=o+1; i=i+1 } return o } |
| 27 | func gcatn(dst: *u8, off: i64, v: i64) -> i64 { var m: i64=v; var o: i64=off; if m==0{dst[o]=48 as u8; return o+1} let t: *u8=sys_mmap(28); var k: i64=0; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{dst[o+i]=t[k-1-i];i=i+1} return o+k } |
| 30 | func cg_key(out: *u8, w: i64, i: i64) -> i64 { var o: i64=0; o=gcat(out,o,"k:w" as *u8); o=gcatn(out,o,w); o=gcat(out,o,"i" as *u8); o=gcatn(out,o,i); out[o]=0 as u8; return o } |
| 31 | func cas_worker(prefix: *u8, w: i64, locked: i64) -> i64 |
| 42 | func cas_spawn(prefix: *u8, locked: i64) -> i64 |
| 55 | func cas_retrievable(prefix: *u8) -> i64 |
| 64 | func cas_prefix(out: *u8, tag: *u8, epoch: i64) -> i64 { var o: i64=gcat(out,0,"/tmp/" as *u8); o=gcat(out,o,tag); o=gcatn(out,o,epoch); o=gcat(out,o,"-" as *u8); out[o]=0 as u8; return o } |
| 67 | func gh_env() -> *i64 |
| 75 | func gh_run(argv: *i64) -> i64 |
| 87 | func gh_init(repo: *u8) -> i64 { let a: *i64=sys_mmap(8*8) as *i64; a[0]=GH_GIT as i64; a[1]="init" as *u8 as i64; a[2]="-q" as *u8 as i64; a[3]=repo as i64; a[4]=0; return gh_run(a) } |
| 88 | func gh_commit(repo: *u8) -> i64 { let a: *i64=sys_mmap(8*12) as *i64; a[0]=GH_GIT as i64; a[1]="-C" as *u8 as i64; a[2]=repo as i64; a[3]="commit" as *u8 as i64; a[4]="--allow-empty" as *u8 as i64; a[5]="-q" as *u8 as i64; a[6]="-m" as *u8 as i64; a[7]="c" as *u8 as i64; a[8]=0; return gh_run(a) } |
| 90 | func gh_spawn(repo: *u8) -> i64 |
| 105 | func main() -> i64 |