ref: 3af73a7086c91dd6b94b5407081e4a9c80014a5b
dir: /lib/std/syswrap-ss+openbsd.myr/
use sys use "errno.use" use "cstrconv.use" use "slcp.use" use "die.use" pkg std = const nanosleep : (nsecs : uint64 -> errno) $noret const exit : (status:int -> void) pkglocal const bgetcwd : (buf : byte[:] -> errno) ;; const exit = {status; sys.exit(status)} const bgetcwd = {buf -> (sys.__getcwd(buf) - 1 : errno) } const nanosleep = {nsecs var req, rem var s, ns s = nsecs / 1_000_000_000 ns = nsecs % 1_000_000_000 req = [.sec = s, .nsec = ns] -> (sys.nanosleep(&req, &rem) : errno) }