[movitz-devel] OS decisions

Frode V. Fjeld frodef at cs.uit.no
Mon Jun 15 13:25:36 UTC 2009


Robert Swindells <rjs at fdy2.demon.co.uk> writes:

> The trampoline also doesn't allow for multiple devices sharing an
> interrupt.

How would this be allowed for?

My very vague idea of how shared interrupts work is that upon an
interrupt each handler is called in turn, and each must poll its
device to see if it requires service. But for all I know there's
something more sophisticated going on?

> 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.

Oh, I see. As you mentioned my reasoning is/was that we have closures
for this (or conversely, "user objects" are a poor man's closures),
but adding a "user object" would be trivial, of course. It could even
be added just like so:

  (defun set-exception-handler-with-user-object (vector handler user-object)
    (setf (exception-handler vector)
      (lambda (frame stack)
        (funcall handler frame stack user-object))))


 :-)

-- 
Frode V. Fjeld





More information about the movitz-devel mailing list