summaryrefslogtreecommitdiff
path: root/arm9/lib/NitroSDK/src/OS_terminate_proc.c
blob: fdc4dbff125052630476228490bd0b39f9b9e34e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "OS_terminate_proc.h"
#include "function_target.h"
#include "OS_system.h"

ARM_FUNC void OS_Terminate(void)
{
    while (TRUE)
    {
        (void)OS_DisableInterrupts();
        OS_Halt();
    }
}

ARM_FUNC asm void OS_Halt(void)
{
    mov r0, #0x0
    mcr p15, 0x0, r0, c7, c0, 0x4 //Wait For Interrupt (Halt)
    bx lr
}