Created
December 13, 2013 15:34
-
-
Save anonymous/7946037 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_interrupt_handler: | |
portSAVE_CONTEXT | |
/* Stack the return address. */ | |
swi r14, r1, portR14_OFFSET | |
/* Switch to the ISR stack. */ | |
lwi r1, r0, pulISRStack | |
/* The parameter to the interrupt handler. */ | |
ori r5, r0, configINTERRUPT_CONTROLLER_TO_USE | |
/* Execute any pending interrupts. */ | |
bralid r15, XIntc_DeviceInterruptHandler | |
or r0, r0, r0 | |
/* See if a new task should be selected to execute. */ | |
lwi r18, r0, ulTaskSwitchRequested | |
or r18, r18, r0 | |
/* If ulTaskSwitchRequested is already zero, then jump straight to | |
restoring the task that is already in the Running state. */ | |
beqi r18, task_switch_not_requested | |
/* Set ulTaskSwitchRequested back to zero as a task switch is about to be | |
performed. */ | |
swi r0, r0, ulTaskSwitchRequested | |
/* ulTaskSwitchRequested was not 0 when tested. Select the next task to | |
execute. */ | |
bralid r15, vTaskSwitchContext | |
or r0, r0, r0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment