kernel/src/common/interrupt.c
void __attribute__((interrupt("IRQ"))) irq_handler(void) {
    DEBUG("IRQ HANDLER");
    return chipset.handle_irq();

    //    int * pendingregister = (int *) 0x40000060;
    //	int cpsr = disable_interrupt_save(IRQ);

    // os_printf("disabled CSPR:%X\n",cpsr);
    // Discover source of interrupt
    // do a straight run through the VIC_INT_STATUS to determine
    // which interrupt lines need to be tended to
    //	for (int i = 0; i < MAX_NUM_INTERRUPTS; i++) {
    //		// is the line active?
    //		if ((1 << i) & mmio_read(&interrupt_registers->irq_basic_pending)) {
    //			// activate that specific handler
    //			handle_irq_interrupt(i);
    //		}
    //	}
    // we've gone through the VIC and handled all active interrupts
    // restore_proc_status(cpsr);

    //	enable_interrupt(IRQ_MASK);
}
// the attribute automatically saves and restores state
// TODO: We might not want that! (context switches etc)
the attribute automatically saves and restores state
TODO: We might not want that. (context switches etc)
the attribute automatically saves and restores state TODO : We might not want that . ( context switches etc )
void __attribute__((interrupt("IRQ"))) irq_handler(void) {
    DEBUG("IRQ HANDLER");
    return chipset.handle_irq();
}
void __attribute__ ( ( interrupt ( " " ) ) ) irq_handler ( void ) { DEBUG ( " " ) ; return chipset . handle_irq ( ) ; }
the attribute automatically saves and restores state
TODO: We might not want that!
the attribute automatically saves and restores state TODO : We might not want that!
//    int * pendingregister = (int *) 0x40000060; //	int cpsr = disable_interrupt_save(IRQ); // os_printf("disabled CSPR:%X\n",cpsr); // Discover source of interrupt // do a straight run through the VIC_INT_STATUS to determine // which interrupt lines need to be tended to //	for (int i = 0; i < MAX_NUM_INTERRUPTS; i++) { //		// is the line active? //		if ((1 << i) & mmio_read(&interrupt_registers->irq_basic_pending)) { //			// activate that specific handler //			handle_irq_interrupt(i); //		} //	} // we've gone through the VIC and handled all active interrupts // restore_proc_status(cpsr); //	enable_interrupt(IRQ_MASK);