Files
mk64/src/os/__osSetHWIntrRoutine.c
T
Tyler McGavran bd82bf5f0c Relocate rodata for some OS related function (#292)
Required moving a struct def to another file, and I renamed a
 struct to something nicer

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
2023-03-24 00:49:30 -06:00

15 lines
471 B
C
Executable File

#include "libultra_internal.h"
// Its not clear how big this array should be.
// In order for file alignment to be correct, it needs to be
// at least 5 but no more than 8. Beyond that its not clear
// what its size should be
s32 (*__osHwIntTable[5])(void) = {NULL};
void __osSetHWIntrRoutine(OSHWIntr interrupt, s32 (*handler)(void))
{
register u32 saveMask;
saveMask = __osDisableInt();
__osHwIntTable[interrupt] = handler;
__osRestoreInt(saveMask);
}