1 # SYS/SYS.D - Misc internalized support (for speed)
7 # The bcopy we all know and love, with bounds-checking and cast
8 # limitations (you can't synthesize structures containing lvalues,
9 # pointers, or references with it).
11 public internal void bcopy(const void *s, void *d, size_t);
15 # This issues the C exit(), killing the process and all of its
18 public internal void exit(int code);
22 # This terminates the program, killing the process and all of its
23 # theads, and core-dumping if DebugOpt is set in the runtime.
25 public internal void abort();
29 # Execs a program. Rune provides a number of additional helper
30 # functions (written in Rune) for other forms. Rune will automatically
31 # clear O_CLOEXEC on descriptors 0, 1, and 2. Any other descriptors
32 # will depend on their O_CLOEXEC status. Note that by default any
33 # new descriptors opened by a Rune program set O_CLOEXEC by default.
35 #public internal int execve(const char *path,
36 # const char **argv, const char **envp);
40 # Get or modify the current environment. Similar to the C calls
41 # but setenv() always overwrites.
43 public internal char *getenv(const char *name);
44 public internal void setenv(const char *name, const char *value);
45 public internal int unsetenv(const char *name);
51 Sys.panic(const char *ctl, ...)
55 # XXX implement va_list and ... passing.
60 fs.write(ctl, Str.strlen(ctl));