MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / OSDisableInterrupts

Function OSDisableInterrupts

src/dolphin/src/os/OSInterrupt.c:27–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25};
26
27asm BOOL OSDisableInterrupts(void)
28{
29 // clang-format off
30 nofralloc
31entry __RAS_OSDisableInterrupts_begin
32 mfmsr r3
33 rlwinm r4, r3, 0, 17, 15
34 mtmsr r4
35entry __RAS_OSDisableInterrupts_end
36 rlwinm r3, r3, 17, 31, 31
37 blr
38 // clang-format on
39}
40asm BOOL OSEnableInterrupts(void)
41{
42 // clang-format off
43 nofralloc
44
45 mfmsr r3
46 ori r4, r3, 0x8000
47 mtmsr r4
48 rlwinm r3, r3, 17, 31, 31
49 blr
50 // clang-format on
51}
52
53asm BOOL OSRestoreInterrupts(register BOOL level){
54 // clang-format off
55
56 nofralloc
57
58 cmpwi level, 0
59 mfmsr r4
60 beq _disable
61 ori r5, r4, 0x8000
62 b _restore
63_disable:
64 rlwinm r5, r4, 0, 17, 15
65_restore:
66 mtmsr r5
67 rlwinm r3, r4, 17, 31, 31
68 blr
69 // clang-format on
70}
71
72__OSInterruptHandler __OSSetInterruptHandler(__OSInterrupt interrupt, __OSInterruptHandler handler)
73{
74 __OSInterruptHandler oldHandler;
75
76 oldHandler = InterruptHandlerTable[interrupt];
77 InterruptHandlerTable[interrupt] = handler;
78 return oldHandler;
79}
80
81__OSInterruptHandler __OSGetInterruptHandler(__OSInterrupt interrupt)
82{

Callers 15

SISetSamplingRateFunction · 0.85
SIEnablePollingInterruptFunction · 0.85
SIRegisterPollingHandlerFunction · 0.85
__SITransferFunction · 0.85
SIGetStatusFunction · 0.85
SISetXYFunction · 0.85
SIEnablePollingFunction · 0.85
SIDisablePollingFunction · 0.85
SIGetResponseFunction · 0.85
SITransferFunction · 0.85
SIGetTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected