[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Calling gemdos function from Interruption
On Tue, 2005-10-11 at 12:40 +0200, Ingo Schmidt wrote:
> I can call GEMDOS calls within a signal handler. And in XaAES I can
> even make AES calls from within a signal handler.
> But a signal handler is context dependant. The OS knows to which
> process a signal handler belongs.
My first reaction was "why?", since, in Unix, I'm used to simply setting
a flag or something in a signal handler, and then handling the signal
from the process's main event loop, keeping the signal handler as small
However, with the Atari, most event loops are simply just a call to
evnt_multi(), which doesn't handle file handle events. Being able to
call GEMDOS within the signal handler could possibly be quite useful as
you could have a background thread handling file/pipe/network IO and
simply send a signal to the parent AES process to tell it to update its
If evnt_multi was the last OS call made when a signal handler fires,
does evnt_multi() return with some error code to say it was interrupted
by a signal (making it possible to use the "set a flag and handle it in
the main event loop method) or does the evnt_multi() continue to wait
for AES events (meaning you'd have to handle the signal completely
within the signal handler, and being able to call GEMDOS and AES would
be incredibly useful!).