Re: OS decisions
[email protected] (Frode V. Fjeld) Mon, 15 Jun 2009 15:25:36 +0200
| Newsgroups | gmane.lisp.movitz.devel |
|---|---|
| Message-ID | <[email protected]> |
Robert Swindells <[email protected]> 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