summaryrefslogtreecommitdiff
path: root/arm9/lib/src/OS_terminate_proc.c
blob: 40b015d9e2477823871279c0c14bbec9c77a02ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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(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
    bx lr
}