summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kvm/user/test/x86/exit.c')
-rw-r--r--kvm/user/test/x86/exit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kvm/user/test/x86/exit.c b/kvm/user/test/x86/exit.c
new file mode 100644
index 000000000..8903621b1
--- /dev/null
+++ b/kvm/user/test/x86/exit.c
@@ -0,0 +1,7 @@
+#include "runtime.h"
+
+void exit(unsigned code)
+{
+ asm volatile("out %al, %dx" : : "a"(code), "d"(0xf4));
+ asm volatile("cli; hlt");
+}