Exemple #1
0
/*
 * All signals call this routine.
 * This routine then calls the appropriate ISR Handler.
 */
void HalIsrHandler( int SignalNumber )
{
        INDEX index;
        enum IRQ_LEVEL irq;

#ifdef DEBUG
        HalUpdateIsrDebugInfo();
#endif

        //We dont know which irq is associated with SignalNumber, so lets find it.
        for(index = 0; index < IRQ_LEVEL_COUNT; index++) {
                if( HalIrqToSignal[index] == SignalNumber ) {
                        //We found it, call the appropriate ISR.
                        irq = index;
                        HalIsrJumpTable[irq]();
#ifdef DEBUG
                        //We are about to return into an unknown frame.
                        //I can't predict what the irq will be there.
                        HalInvalidateIsrDebugInfo();
#endif
                        return;
                }
        }

        HalPanic("Signal delivered for which no Irq was registered", SignalNumber);
}
Exemple #2
0
/*
 * All signals call this routine.
 * This routine then calls the appropriate ISR Handler.
 */
void HalIsrHandler( int SignalNumber )
{
        enum IRQ_LEVEL irq = HalSignalToIrq[SignalNumber];
        HAL_ISR_HANDLER * handler = HalSignalToHandler[SignalNumber];

        ASSERT (SignalNumber >= 0 && SignalNumber < NSIG);
        if (handler == NULL) {
                HalPanic("Signal delivered for which no Irq was registered");
        }
        ASSERT (handler != NULL);
        ASSERT (irq != IRQ_LEVEL_NONE);
#ifdef DEBUG
        HalUpdateIsrDebugInfo();
#endif
        handler(irq);
#ifdef DEBUG
        //We are about to return into an unknown frame.
        //I can't predict what the irq will be there.
        HalInvalidateIsrDebugInfo();
#endif
}