code wiki / _hdl_build / _spin_forever.nx
_spin_forever.nx source
↩ module page · 9 lines · 310 B
1// _spin_forever.nx -- deliberate infinite spinner: the perf organs' gate
2// target (a controlled specimen of the bug class they exist to catch).
3// license_tier: ORIGINAL
4import "nx_syscalls.nx"
5func main() -> i64 {
6 var x: i64 = 1
7 while x > 0 { x = x + 1; if x > 1000000000 { x = 1 } }
8 return 0
9}