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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 572 jeremybenn
                RSEG ICODE:CODE
2
                CODE32
3
 
4
        EXTERN vTaskSwitchContext
5
        EXTERN vTaskIncrementTick
6
        EXTERN vPortPreemptiveTick
7
 
8
        PUBLIC vPortPreemptiveTickEntry
9
        PUBLIC vPortYieldProcessor
10
        PUBLIC vPortStartFirstTask
11
 
12
#include "FreeRTOSConfig.h"
13
#include "ISR_Support.h"
14
 
15
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16
; Starting the first task is just a matter of restoring the context that
17
; was created by pxPortInitialiseStack().
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19
vPortStartFirstTask:
20
        portRESTORE_CONTEXT
21
 
22
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
23
; Manual context switch function.  This is the SWI hander.
24
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25
vPortYieldProcessor:
26
        ADD             LR, LR, #4                      ; Add 4 to the LR to make the LR appear exactly
27
                                                                ; as if the context was saved during and IRQ
28
                                                                ; handler.
29
 
30
        portSAVE_CONTEXT                        ; Save the context of the current task...
31
        LDR R0, =vTaskSwitchContext     ; before selecting the next task to execute.
32
        mov     lr, pc
33
        BX R0
34
        portRESTORE_CONTEXT                     ; Restore the context of the selected task.
35
 
36
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
37
; Preemptive context switch function.  This will only ever get installed if
38
; portUSE_PREEMPTION is set to 1 in portmacro.h.
39
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
40
vPortPreemptiveTickEntry:
41
#if configUSE_PREEMPTION == 1
42
        portSAVE_CONTEXT                        ; Save the context of the current task...
43
        LDR R0, =vPortPreemptiveTick; before selecting the next task to execute.
44
        mov     lr, pc
45
        BX R0
46
        portRESTORE_CONTEXT                     ; Restore the context of the selected task.
47
#endif
48
 
49
        END
50
 

powered by: WebSVN 2.1.0

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