]> git.sur5r.net Git - freertos/blob - Source/portable/IAR/STR75x/portasm.s79
Update version numbers to V4.8.0
[freertos] / Source / portable / IAR / STR75x / portasm.s79
1 ;       FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.\r
2 ;\r
3 ;       This file is part of the FreeRTOS.org distribution.\r
4 ;\r
5 ;       FreeRTOS.org is free software; you can redistribute it and/or modify\r
6 ;       it under the terms of the GNU General Public License as published by\r
7 ;       the Free Software Foundation; either version 2 of the License, or\r
8 ;       (at your option) any later version.\r
9 ;\r
10 ;       FreeRTOS.org is distributed in the hope that it will be useful,\r
11 ;       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 ;       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 ;       GNU General Public License for more details.\r
14 ;\r
15 ;       You should have received a copy of the GNU General Public License\r
16 ;       along with FreeRTOS.org; if not, write to the Free Software\r
17 ;       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
18 ;\r
19 ;       A special exception to the GPL can be applied should you wish to distribute\r
20 ;       a combined work that includes FreeRTOS.org, without being obliged to provide\r
21 ;       the source code for any proprietary components.  See the licensing section\r
22 ;       of http://www.FreeRTOS.org for full details of how and when the exception\r
23 ;       can be applied.\r
24 ;\r
25 ;       ***************************************************************************\r
26 ;       See http://www.FreeRTOS.org for documentation, latest information, license\r
27 ;       and contact details.  Please ensure to read the configuration and relevant\r
28 ;       port sections of the online documentation.\r
29 ;       ***************************************************************************\r
30 \r
31         RSEG ICODE:CODE\r
32         CODE32\r
33 \r
34         EXTERN vPortPreemptiveTick\r
35         EXTERN vTaskSwitchContext\r
36 \r
37         PUBLIC vPortYieldProcessor\r
38         PUBLIC vPortStartFirstTask\r
39 \r
40 #include "ISR_Support.h"\r
41 \r
42 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
43 ; Starting the first task is just a matter of restoring the context that\r
44 ; was created by pxPortInitialiseStack().\r
45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
46 vPortStartFirstTask:\r
47         portRESTORE_CONTEXT\r
48 \r
49 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
50 ; Manual context switch function.  This is the SWI hander.\r
51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
52 vPortYieldProcessor:\r
53         ADD             LR, LR, #4                      ; Add 4 to the LR to make the LR appear exactly\r
54                                                                 ; as if the context was saved during and IRQ\r
55                                                                 ; handler.\r
56                                                                 \r
57         portSAVE_CONTEXT                        ; Save the context of the current task...\r
58         LDR R0, =vTaskSwitchContext     ; before selecting the next task to execute.\r
59         mov     lr, pc\r
60         BX R0\r
61         portRESTORE_CONTEXT                     ; Restore the context of the selected task.\r
62 \r
63 \r
64 \r
65         END\r
66 \r