[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: user-written interrupt handlers
Hello Howard,
> >I would think that any user-supplied interrupt handlers should be provided
> >as device drivers; they can then call into the kernel via the table that
> >MiNT provides, and don't have to worry about going through trap #1.
>
> Well, I decided I was taking an impossible tack, so I tried again from a
> different angle... Now I have a new DOS call Psiginter(vec,sig) which will
> install an interrupt handler for the user, that will send the calling process
> the signal sig when the given interrupt occurs. I basically copied the Do_sig
Signal handlers aren't good replacements for interrupts; they take too
much time to be serviced -- maybe a tenth of a second, versus a few
microseconds for an interrupt handler. It would be unusable, for
instance, for the serial interrupts, while it would be quite appropriate
for "Monochrome Detect", say.
On the other hand, it should be _possible_ for an interrupt handler to
raise a signal; for instance, in the case of a SLIP handler, we'd like
to receive a signal (or whatever) when a datagram has been completely
received, not at every received character...
But I don't know if it is safe to call Pkill (via the kernel) in an
interrupt handler.
Thierry.