dillon@CORY.BERKELEY.EDU (Matt Dillon) (01/19/88)
When in doubt, refer to RKM! Software interrupts look *really* neat, especially considering that one can set up a message port to cause one. Still, I'm somewhat confused as to the proper setup for a software interrupt. Looking at the ROM code (when still in doubt, disassemble the ROM), I find the Cause() does nothing if the ln_Type of the interrupt node for the software interrupt is NT_SOFTINT. Am I missing something here? I figured that a software interrupt is not something you 'add' to the system, but something that gets specifically executed with Cause() or a ReplyMsg() to a port set to PA_SOFTINT. So that means that I can 'remove' the software interrupt simply by not calling Cause() anymore and not using (or changing) the PA_SOFTINT message port. Apart from that, I *think* I understand how it works. Does anybody know what the overhead for a software interrupt is as compared to, say, a context switch (thoughts about speeding up a certain device driver I know). --- Undocumented feature for message ports: Current there are three types of message ports. PA_SIGNAL(0), PA_SOFTINT(1), and PA_IGNORE(2). However, a third type (3) appears to be implemented by PutMsg(). I'll call it PA_VECTOR(3), because what it does is JSR to the vector in mp_SigTask IMMEDIATELY. I can see uses for this kind of ability! Obviously this means the service routine is run in the context of whoever did the PutMsg()... another task or even an interrupt service routine. My question to CA is: Can I count on this to stay in? It's only 4 lines of assembly in ROM. -Matt