next up previous
Next: A sample C Code Up: Registering a Timer with Previous: Programming the PIT

Registering ISR

Writing an Interrupt Service Routine is not that trivial. An ISR must do things like saving context of the currently executing process, reinitializing the PIC etc. Fortunately a top level ISR is provided by OSkit in
kern/x86/pc/base_irq_inittab.S
You can however have your own ``C'' function as a second level interrupt handler. The low level things are handled by OSkits handler, which then branches to your high level ``C'' handler function.

You can register your schedule function as the high level handler by setting

base_irq_handlers[0]=&schedule;
Read the chapter on Kernel Support Library. That chapter covers all of the above topics.

Soumyadeb Mitra 2002-10-23