mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-04 19:05:38 +00:00
Don't allow "recursive" NanoKernel interrupts
This commit is contained in:
parent
ec6c98035b
commit
3a960764ea
@ -1100,6 +1100,10 @@ void sheepshaver_cpu::handle_interrupt(void)
|
||||
if (InterruptFlags == 0)
|
||||
return;
|
||||
|
||||
// Current interrupt nest level
|
||||
static int interrupt_depth = 0;
|
||||
++interrupt_depth;
|
||||
|
||||
// Disable MacOS stack sniffer
|
||||
WriteMacInt32(0x110, 0);
|
||||
|
||||
@ -1116,7 +1120,7 @@ void sheepshaver_cpu::handle_interrupt(void)
|
||||
case MODE_NATIVE:
|
||||
// 68k emulator inactive, in nanokernel?
|
||||
assert(current_cpu == main_cpu);
|
||||
if (gpr(1) != KernelDataAddr) {
|
||||
if (gpr(1) != KernelDataAddr && interrupt_depth == 1) {
|
||||
interrupt_context ctx(this, "PowerPC mode");
|
||||
|
||||
// Prepare for 68k interrupt level 1
|
||||
@ -1171,6 +1175,9 @@ void sheepshaver_cpu::handle_interrupt(void)
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
// We are done with this interrupt
|
||||
--interrupt_depth;
|
||||
}
|
||||
|
||||
static void get_resource(void);
|
||||
|
Loading…
Reference in New Issue
Block a user