summaryrefslogtreecommitdiffstats
path: root/lib/_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_exit.c')
-rw-r--r--lib/_exit.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/_exit.c b/lib/_exit.c
new file mode 100644
index 000000000..a46f1a2b6
--- /dev/null
+++ b/lib/_exit.c
@@ -0,0 +1,18 @@
+/*
+ * linux/lib/_exit.c
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ */
+
+#define __LIBRARY__
+#include <linux/unistd.h>
+
+volatile void _exit(int exit_code)
+{
+fake_volatile:
+ __asm__("movl %1,%%ebx\n\t"
+ "int $0x80"
+ : /* no outputs */
+ :"a" (__NR_exit),"g" (exit_code));
+ goto fake_volatile;
+}