[movitz-devel] OS decisions
Robert Swindells
rjs at fdy2.demon.co.uk
Mon Jun 15 12:59:41 UTC 2009
Frode V. Fjeld <frodef at cs.uit.no> wrote:
>Robert Swindells <rjs at fdy2.demon.co.uk> writes:
>
>> The interrupt handling sequence might benefit from some changes too,
>> I guess you could install a closure as the handler but it could be
>> simpler to pass some object as an argument to the handler function.
>As of now there's two mechanisms for setting up interrupt
>handlers. The lower-level one is pretty much exactly the setting of
>the vector in the CPU's handler table (I forget the name). They are
>now all being set to the default interrupt trampoline, which
>implements the second configuration level: The calling of any lisp
>function, as specified by the "exception-handler" accessor.
I know, but the trampoline only passes vector number and stack frame
to the handler.
The trampoline also doesn't allow for multiple devices sharing an
interrupt.
It would probably be a good idea to move the code to clear interrupts
below the level of the interrupt handlers, maybe test for non-nil
return value from the handler(s) before clearing it.
>> to pass some object as an argument to the handler function.
>
>I don't quite understand what you mean by this?
Most operating systems pass some object to interrupt handlers rather than
having to use global data. It simplifies the code when you have multiple
instances of a particular device.
Robert Swindells
More information about the movitz-devel
mailing list