OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Source/] [portable/] [IAR/] [AtmelSAM9XE/] [portasm.s79] - Blame information for rev 572

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 572 jeremybenn
                RSEG ICODE:CODE
2
                CODE32
3
 
4
        EXTERN vTaskSwitchContext
5
 
6
        PUBLIC vPortYieldProcessor
7
        PUBLIC vPortStartFirstTask
8
 
9
#include "ISR_Support.h"
10
 
11
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
; Starting the first task is just a matter of restoring the context that
13
; was created by pxPortInitialiseStack().
14
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15
vPortStartFirstTask:
16
        portRESTORE_CONTEXT
17
 
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19
; Manual context switch function.  This is the SWI hander.
20
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21
vPortYieldProcessor:
22
        ADD             LR, LR, #4                      ; Add 4 to the LR to make the LR appear exactly
23
                                                                ; as if the context was saved during and IRQ
24
                                                                ; handler.
25
 
26
        portSAVE_CONTEXT                        ; Save the context of the current task...
27
        LDR R0, =vTaskSwitchContext     ; before selecting the next task to execute.
28
        mov     lr, pc
29
        BX R0
30
        portRESTORE_CONTEXT                     ; Restore the context of the selected task.
31
 
32
 
33
        END
34
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.