summaryrefslogtreecommitdiff
path: root/arm9/lib/src/OS_terminate_proc.c
diff options
context:
space:
mode:
authorMade <made111@gmx.de>2020-05-08 23:06:05 +0200
committerMade <made111@gmx.de>2020-05-08 23:06:05 +0200
commitae744a2ea5a31f19330aedd1e264c88b97873c1c (patch)
treea30d34cbfba4e518eb6a7d4a52154ed86d41a428 /arm9/lib/src/OS_terminate_proc.c
parent6d3d11491cf6e8289822d2c5ba9cd7e309a5ce11 (diff)
parentf76cec09f8a2995244256d4b097d9eed2bebd34a (diff)
Merge branch 'master' of https://github.com/martmists/pokediamond
Diffstat (limited to 'arm9/lib/src/OS_terminate_proc.c')
-rw-r--r--arm9/lib/src/OS_terminate_proc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arm9/lib/src/OS_terminate_proc.c b/arm9/lib/src/OS_terminate_proc.c
new file mode 100644
index 00000000..eb267c6b
--- /dev/null
+++ b/arm9/lib/src/OS_terminate_proc.c
@@ -0,0 +1,21 @@
+//
+// Created by red031000 on 2020-05-07.
+//
+
+#include "types.h"
+#include "OS_terminate_proc.h"
+#include "function_target.h"
+#include "OS_system.h"
+
+ARM_FUNC void OS_Terminate() {
+ while (TRUE) {
+ (void)OS_DisableInterrupts();
+ OS_Halt();
+ }
+}
+
+ARM_FUNC asm void OS_Halt() {
+ mov r0, #0x0
+ mcr p15, 0x0, r0, c7, c0, 0x4
+ bx lr
+}