| 1 | (* An Rt for test/err/RtPair: exit and fail, and `calls` with no |
| 2 | `teller` to be given its address, which the compiler refuses. *) |
| 3 | module Rt; |
| 4 | import SYSTEM; |
| 5 | |
| 6 | const ExitGroup = 231; (* Linux's exit_group(status) *) |
| 7 | |
| 8 | (* Ends the program with status *) |
| 9 | proc exit*(status: INT); |
| 10 | begin |
| 11 | _ := SYSTEM.SYSCALL(ExitGroup, status); |
| 12 | end; |
| 13 | |
| 14 | (* A check failed; this Rt ends the program *) |
| 15 | proc fail*(_what, _a, _b, _len: INT; _at: UINT; _name: ^U8; _rdi, _rsi: UINT); |
| 16 | begin |
| 17 | exit(2); |
| 18 | end; |
| 19 | |
| 20 | (* Says the calls under way: the half of a pair that is alone *) |
| 21 | proc calls*; |
| 22 | begin |
| 23 | end; |
| 24 | |
| 25 | end Rt. |