[comp.sys.amiga.tech] Shared Interrupt Handlers

kent@swrinde.nde.swri.edu (Kent D. Polk) (09/19/89)

I need to service a hardware interrupt using code that (apparently)
can't operate in Supervisor state.  Without the offending call, an
interrupt server works fine, but... I understand I need to use a
handler.

The problem is that I am using a shared interrupt - INTB_PORTS. I don't
see anywhere that interrupt handlers are called by the shared server
handler.

I sure can't just grab the interrupt & go...

Questions:

1) Are INTB_PORTS (shared) interrupts handled by the server handler for
both interrupt servers and interrupt handlers? I.e. can I just fall
through if my board didn't pull the interrupt line & expect everything
else to continue to be serviced when I call an interrupt handler?
(Or moveq #1,d0; when it was mine?)

2) If not, how can I service a shared interrupt asynchronously while in
user state? I can't always Wait().

3) If so, can someone point me to info that documents how to properly
set up an interrupt handler to deal with when it is and isn't mine?

Actually, the ISR needs to operate in two modes: asynchronously and
with signals for when I need to Wait() for the event. My interrupt
server test routine currently does these operations correctly - just
can't accomplish the asynchronous operation mode while in Supervisor.

Thanks,
====================================================================
Kent Polk - Southwest Research Institute - kent@swrinde.nde.swri.edu
        Motto : "Anything worth doing is worth overdoing"
====================================================================

kent@swrinde.nde.swri.edu (Kent D. Polk) (09/19/89)

In article <21387@swrinde.nde.swri.edu> kent@swrinde.nde.swri.edu (Kent D. Polk) writes:
>
>I need to service a hardware interrupt using code that (apparently)
>can't operate in Supervisor state.  Without the offending call, an
>interrupt server works fine, but... I understand I need to use a
>handler.
[...]
>2) If not, how can I service a shared interrupt asynchronously while in
>user state? I can't always Wait().

I see I have used the term asynchronously a bit too lightly. I had
thought of setting up a separate task which could be signaled to
perform the service & it could also signal the main task when
necessary, but I really shouldn't have two tasks talking to my device.
In fact, after thinking about it a bit more I am even more confused
about how to go about accomplishing what I want. So, it's back to the
drawing board...

I still would like to know if interrupt handlers can be inserted into a
shared handler's linked list & yet operate in user mode - I don't see
how that would be possible given my understanding of how things work.

Thanks much,
====================================================================
Kent Polk - Southwest Research Institute - kent@swrinde.nde.swri.edu
        Motto : "Anything worth doing is worth overdoing"
====================================================================