aboutsummaryrefslogtreecommitdiff
path: root/pk/frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'pk/frontend.c')
-rw-r--r--pk/frontend.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pk/frontend.c b/pk/frontend.c
index 0929d54..52e26fa 100644
--- a/pk/frontend.c
+++ b/pk/frontend.c
@@ -5,6 +5,7 @@
#include "frontend.h"
#include "sbi.h"
#include "mcall.h"
+#include "syscall.h"
#include <stdint.h>
uint64_t tohost_sync(unsigned dev, unsigned cmd, uint64_t payload)
@@ -44,3 +45,9 @@ long frontend_syscall(long n, long a0, long a1, long a2, long a3, long a4, long
spinlock_unlock(&lock);
return ret;
}
+
+void die(int code)
+{
+ frontend_syscall(SYS_exit, code, 0, 0, 0, 0, 0, 0);
+ while (1);
+}