diff options
author | Revo <projectrevotpp@hotmail.com> | 2020-05-08 10:44:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-08 10:44:07 -0400 |
commit | f76cec09f8a2995244256d4b097d9eed2bebd34a (patch) | |
tree | d3a3270ca2c2f3895378d1681350bc7636ed0c10 /arm9/lib/src/OS_terminate_proc.c | |
parent | df51b3c4ff11fc6302600298d3f18681101196b1 (diff) | |
parent | 4d444cabe0a241afd7d12e565c6a32f866b260bd (diff) |
Merge pull request #70 from red031000/master
OS_terminate_proc and partial OS_interrupt
Diffstat (limited to 'arm9/lib/src/OS_terminate_proc.c')
-rw-r--r-- | arm9/lib/src/OS_terminate_proc.c | 21 |
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 +} |