EXEC_RETURN | HANDLE_INTERRUPT. And then, we handled the interrupt, but
EXEC_RETURN was set so we returned very quickly without completing the
interrupt routine. As a side effect, this occasionnaly hung the emulator
most likely with {ethernet,audio}-based applications that trigger a lot
of interrupts.
The fix is to always honour EXEC_RETURN flag at first, of course.
(idle_wait) until events arrived and notified through TriggerInterrupt().
i.e. we no longer sleep a fixed amount of time on platforms that support
a thread wait/signal mechanism.
the Ethernet interrupt. The BeOS version does that, likewise for MOL. Otherwise,
we end up into an infinite loop reporting the memory allocation failure.
I think this is now the expected behavior as we wouldn't have stats
(num_rx_no_mem) for it if we couldn't get out of the EtherIRQ. ;-) Besides,
the packet will be resent for reliable networks.
i.e. it returned EPERM and ran into stack corruption to eventually crash the
emulator. This is noticeable in !hw_mac_cursor_accl mode (e.g. fullscreen DGA).
In order to the sigalstack() to be effective, we must kludge the kernel to
think it's running on another stack. In practise, we provide another stack
for the SIGUSR2 handler. sigusr2_handler_init() fulfills that purpose.
I hope this fixes remaining issues forever. At some point, I had multiple
*_init() handlers in case this is necessary.
- Restore r13 on EMUL_RETURN, though I never saw r13 clobbered
- Increase stack frame allocated to EmulOp processing on par with BeOS
- Factor GetResource wrappers with a macro + restore r13 too
for systems that use a global r2 as the TLS register, e.g. Linux/ppc with
newer glibc. Also remove the syscall junk which were simply workarounds
for this bug. Remove a duplicate r2 restoration in EmulOp.
BTW, it's possible to get SheepShaver running on Linux/ppc systems with
NPTL rather than SheepThreads.
because fb visual was Direct Color instead of True Color). We used to
initialize the_buffer* even if !open_display. Report that gracefully with
the dedicated STR_OPEN_WINDOW_ERR.
interrupt in one_tick() if no pthreads at all are used, i.e. ether_dummy
is effective in that case. Otherwise, don't trigger ethernet again if
pthreads are available (and ether_unix) and cpu emul services are active.
suddenly allocated below RAM and thus not working. Besides, this may fix a
latent deallocation bug in real addressing mode (i.e. release the whole
block allocated at once, not separately).
Side effect: this makes Basilisk II work in direct addressing mode with JIT
on Darwin 8.0.1 for x86.