Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/mt/exit-16-002.c')
-rw-r--r--libgloss/mt/exit-16-002.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libgloss/mt/exit-16-002.c b/libgloss/mt/exit-16-002.c
new file mode 100644
index 000000000..ba048d977
--- /dev/null
+++ b/libgloss/mt/exit-16-002.c
@@ -0,0 +1,12 @@
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+
+void _exit (n)
+{
+ /* Set bit #0 in the _DEBUG_HALT_REG to trigger program exit to
+ the simulator. (The simulator will return a SIGQUIT signal.) */
+ asm("ori r1, r0, #$1\n");
+ asm("stw r1, r0, #$fffff300\n");
+}