aboutsummaryrefslogtreecommitdiff
path: root/sys/rt/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/rt/exit.c')
-rw-r--r--sys/rt/exit.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/rt/exit.c b/sys/rt/exit.c
new file mode 100644
index 0000000..55a684a
--- /dev/null
+++ b/sys/rt/exit.c
@@ -0,0 +1,15 @@
+#include <rt.h>
+#include <sys.h>
+
+void
+rt·exit(int code)
+{
+ if(rt·context.fini)
+ rt·context.fini();
+ if(rt·context.exit)
+ rt·context.exit();
+
+ /* call exit syscalls here */
+
+ for(;;);
+}