3 Jun 2006 16:45
interrupt handlers session data slot
Taylor R. Campbell <campbell <at> mumble.net>
2006-06-03 14:45:20 GMT
2006-06-03 14:45:20 GMT
I've written a statistical profiler for Scheme48 that works by instrumenting the interrupt handler for alarm interrupts. It needs access to the interrupt handler that it replaces, in order to defer to it to actually handle the interrupt, and to revert to it when finished profiling. Unfortunately, there is, at the moment, no way in Scheme48 to get at a current interrupt handler, so right now I'm hard-coding the actual value of the session data key for the interrupt handler vector, which is, of course, totally bogus, but which works provisionally. It would be better, I think, for the INTERRUPTS structure to export either the session data key or a procedure INTERRUPT-HANDLER, by analogy with SET-INTERRUPT-HANDLER!, that returns the current interrupt handler procedure for a certain interrupt. Thoughts? Is there anything fundamentally wrong with this? It's easy to implement, anyway.
Regards,
-- Jorgen
RSS Feed