Labor04
list.h
Go to the documentation of this file.
1 /*
2  * FreeRTOS Kernel V10.0.0
3  * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of
6  * this software and associated documentation files (the "Software"), to deal in
7  * the Software without restriction, including without limitation the rights to
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9  * the Software, and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in all
13  * copies or substantial portions of the Software. If you wish to use our Amazon
14  * FreeRTOS name, please do so in a fair use way that does not cause confusion.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  *
23  * http://www.FreeRTOS.org
24  * http://aws.amazon.com/freertos
25  *
26  * 1 tab == 4 spaces!
27  */
28 
29 /*
30  * This is the list implementation used by the scheduler. While it is tailored
31  * heavily for the schedulers needs, it is also available for use by
32  * application code.
33  *
34  * list_ts can only store pointers to list_item_ts. Each ListItem_t contains a
35  * numeric value (xItemValue). Most of the time the lists are sorted in
36  * descending item value order.
37  *
38  * Lists are created already containing one list item. The value of this
39  * item is the maximum possible that can be stored, it is therefore always at
40  * the end of the list and acts as a marker. The list member pxHead always
41  * points to this marker - even though it is at the tail of the list. This
42  * is because the tail contains a wrap back pointer to the true head of
43  * the list.
44  *
45  * In addition to it's value, each list item contains a pointer to the next
46  * item in the list (pxNext), a pointer to the list it is in (pxContainer)
47  * and a pointer to back to the object that contains it. These later two
48  * pointers are included for efficiency of list manipulation. There is
49  * effectively a two way link between the object containing the list item and
50  * the list item itself.
51  *
52  *
53  * \page ListIntroduction List Implementation
54  * \ingroup FreeRTOSIntro
55  */
56 
57 #ifndef INC_FREERTOS_H
58 #error FreeRTOS.h must be included before list.h
59 #endif
60 
61 #ifndef LIST_H
62 #define LIST_H
63 
64 /*
65  * The list structure members are modified from within interrupts, and therefore
66  * by rights should be declared volatile. However, they are only modified in a
67  * functionally atomic way (within critical sections of with the scheduler
68  * suspended) and are either passed by reference into a function or indexed via
69  * a volatile variable. Therefore, in all use cases tested so far, the volatile
70  * qualifier can be omitted in order to provide a moderate performance
71  * improvement without adversely affecting functional behaviour. The assembly
72  * instructions generated by the IAR, ARM and GCC compilers when the respective
73  * compiler's options were set for maximum optimisation has been inspected and
74  * deemed to be as intended. That said, as compiler technology advances, and
75  * especially if aggressive cross module optimisation is used (a use case that
76  * has not been exercised to any great extend) then it is feasible that the
77  * volatile qualifier will be needed for correct optimisation. It is expected
78  * that a compiler removing essential code because, without the volatile
79  * qualifier on the list structure members and with aggressive cross module
80  * optimisation, the compiler deemed the code unnecessary will result in
81  * complete and obvious failure of the scheduler. If this is ever experienced
82  * then the volatile qualifier can be inserted in the relevant places within the
83  * list structures by simply defining configLIST_VOLATILE to volatile in
84  * FreeRTOSConfig.h (as per the example at the bottom of this comment block).
85  * If configLIST_VOLATILE is not defined then the preprocessor directives below
86  * will simply #define configLIST_VOLATILE away completely.
87  *
88  * To use volatile list structure members then add the following line to
89  * FreeRTOSConfig.h (without the quotes):
90  * "#define configLIST_VOLATILE volatile"
91  */
92 #ifndef configLIST_VOLATILE
93 #define configLIST_VOLATILE
94 #endif /* configSUPPORT_CROSS_MODULE_OPTIMISATION */
95 
96 #ifdef __cplusplus
97 extern "C" {
98 #endif
99 
100 /* Macros that can be used to place known values within the list structures,
101 then check that the known values do not get corrupted during the execution of
102 the application. These may catch the list data structures being overwritten in
103 memory. They will not catch data errors caused by incorrect configuration or
104 use of FreeRTOS.*/
105 #if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 0 )
106 /* Define the macros to do nothing. */
107 #define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
108 #define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE
109 #define listFIRST_LIST_INTEGRITY_CHECK_VALUE
110 #define listSECOND_LIST_INTEGRITY_CHECK_VALUE
111 #define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )
112 #define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )
113 #define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList )
114 #define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList )
115 #define listTEST_LIST_ITEM_INTEGRITY( pxItem )
116 #define listTEST_LIST_INTEGRITY( pxList )
117 #else
118 /* Define macros that add new members into the list structures. */
119 #define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE TickType_t xListItemIntegrityValue1;
120 #define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE TickType_t xListItemIntegrityValue2;
121 #define listFIRST_LIST_INTEGRITY_CHECK_VALUE TickType_t xListIntegrityValue1;
122 #define listSECOND_LIST_INTEGRITY_CHECK_VALUE TickType_t xListIntegrityValue2;
123 
124 /* Define macros that set the new structure members to known values. */
125 #define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) ( pxItem )->xListItemIntegrityValue1 = pdINTEGRITY_CHECK_VALUE
126 #define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) ( pxItem )->xListItemIntegrityValue2 = pdINTEGRITY_CHECK_VALUE
127 #define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList ) ( pxList )->xListIntegrityValue1 = pdINTEGRITY_CHECK_VALUE
128 #define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList ) ( pxList )->xListIntegrityValue2 = pdINTEGRITY_CHECK_VALUE
129 
130 /* Define macros that will assert if one of the structure members does not
131 contain its expected value. */
132 #define listTEST_LIST_ITEM_INTEGRITY( pxItem ) configASSERT( ( ( pxItem )->xListItemIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxItem )->xListItemIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) )
133 #define listTEST_LIST_INTEGRITY( pxList ) configASSERT( ( ( pxList )->xListIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxList )->xListIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) )
134 #endif /* configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES */
135 
136 
137 /*
138  * Definition of the only type of object that a list can contain.
139  */
141 {
142  listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
143  configLIST_VOLATILE TickType_t xItemValue; /*< The value being listed. In most cases this is used to sort the list in descending order. */
144  struct xLIST_ITEM * configLIST_VOLATILE pxNext; /*< Pointer to the next ListItem_t in the list. */
145  struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; /*< Pointer to the previous ListItem_t in the list. */
146  void * pvOwner; /*< Pointer to the object (normally a TCB) that contains the list item. There is therefore a two way link between the object containing the list item and the list item itself. */
147  void * configLIST_VOLATILE pvContainer; /*< Pointer to the list in which this list item is placed (if any). */
148  listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
149 };
150 typedef struct xLIST_ITEM ListItem_t; /* For some reason lint wants this as two separate definitions. */
151 
153 {
154  listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
158 };
159 typedef struct xMINI_LIST_ITEM MiniListItem_t;
160 
161 /*
162  * Definition of the type of queue used by the scheduler.
163  */
164 typedef struct xLIST
165 {
166  listFIRST_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
168  ListItem_t * configLIST_VOLATILE pxIndex; /*< Used to walk through the list. Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */
169  MiniListItem_t xListEnd; /*< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */
170  listSECOND_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
172 
173 /*
174  * Access macro to set the owner of a list item. The owner of a list item
175  * is the object (usually a TCB) that contains the list item.
176  *
177  * \page listSET_LIST_ITEM_OWNER listSET_LIST_ITEM_OWNER
178  * \ingroup LinkedList
179  */
180 #define listSET_LIST_ITEM_OWNER( pxListItem, pxOwner ) ( ( pxListItem )->pvOwner = ( void * ) ( pxOwner ) )
181 
182 /*
183  * Access macro to get the owner of a list item. The owner of a list item
184  * is the object (usually a TCB) that contains the list item.
185  *
186  * \page listSET_LIST_ITEM_OWNER listSET_LIST_ITEM_OWNER
187  * \ingroup LinkedList
188  */
189 #define listGET_LIST_ITEM_OWNER( pxListItem ) ( ( pxListItem )->pvOwner )
190 
191 /*
192  * Access macro to set the value of the list item. In most cases the value is
193  * used to sort the list in descending order.
194  *
195  * \page listSET_LIST_ITEM_VALUE listSET_LIST_ITEM_VALUE
196  * \ingroup LinkedList
197  */
198 #define listSET_LIST_ITEM_VALUE( pxListItem, xValue ) ( ( pxListItem )->xItemValue = ( xValue ) )
199 
200 /*
201  * Access macro to retrieve the value of the list item. The value can
202  * represent anything - for example the priority of a task, or the time at
203  * which a task should be unblocked.
204  *
205  * \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE
206  * \ingroup LinkedList
207  */
208 #define listGET_LIST_ITEM_VALUE( pxListItem ) ( ( pxListItem )->xItemValue )
209 
210 /*
211  * Access macro to retrieve the value of the list item at the head of a given
212  * list.
213  *
214  * \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE
215  * \ingroup LinkedList
216  */
217 #define listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext->xItemValue )
218 
219 /*
220  * Return the list item at the head of the list.
221  *
222  * \page listGET_HEAD_ENTRY listGET_HEAD_ENTRY
223  * \ingroup LinkedList
224  */
225 #define listGET_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext )
226 
227 /*
228  * Return the list item at the head of the list.
229  *
230  * \page listGET_NEXT listGET_NEXT
231  * \ingroup LinkedList
232  */
233 #define listGET_NEXT( pxListItem ) ( ( pxListItem )->pxNext )
234 
235 /*
236  * Return the list item that marks the end of the list
237  *
238  * \page listGET_END_MARKER listGET_END_MARKER
239  * \ingroup LinkedList
240  */
241 #define listGET_END_MARKER( pxList ) ( ( ListItem_t const * ) ( &( ( pxList )->xListEnd ) ) )
242 
243 /*
244  * Access macro to determine if a list contains any items. The macro will
245  * only have the value true if the list is empty.
246  *
247  * \page listLIST_IS_EMPTY listLIST_IS_EMPTY
248  * \ingroup LinkedList
249  */
250 #define listLIST_IS_EMPTY( pxList ) ( ( BaseType_t ) ( ( pxList )->uxNumberOfItems == ( UBaseType_t ) 0 ) )
251 
252 /*
253  * Access macro to return the number of items in the list.
254  */
255 #define listCURRENT_LIST_LENGTH( pxList ) ( ( pxList )->uxNumberOfItems )
256 
257 /*
258  * Access function to obtain the owner of the next entry in a list.
259  *
260  * The list member pxIndex is used to walk through a list. Calling
261  * listGET_OWNER_OF_NEXT_ENTRY increments pxIndex to the next item in the list
262  * and returns that entry's pxOwner parameter. Using multiple calls to this
263  * function it is therefore possible to move through every item contained in
264  * a list.
265  *
266  * The pxOwner parameter of a list item is a pointer to the object that owns
267  * the list item. In the scheduler this is normally a task control block.
268  * The pxOwner parameter effectively creates a two way link between the list
269  * item and its owner.
270  *
271  * @param pxTCB pxTCB is set to the address of the owner of the next list item.
272  * @param pxList The list from which the next item owner is to be returned.
273  *
274  * \page listGET_OWNER_OF_NEXT_ENTRY listGET_OWNER_OF_NEXT_ENTRY
275  * \ingroup LinkedList
276  */
277 #define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \
278 { \
279 List_t * const pxConstList = ( pxList ); \
280  /* Increment the index to the next item and return the item, ensuring */ \
281  /* we don't return the marker used at the end of the list. */ \
282  ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \
283  if( ( void * ) ( pxConstList )->pxIndex == ( void * ) &( ( pxConstList )->xListEnd ) ) \
284  { \
285  ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \
286  } \
287  ( pxTCB ) = ( pxConstList )->pxIndex->pvOwner; \
288 }
289 
290 
291 /*
292  * Access function to obtain the owner of the first entry in a list. Lists
293  * are normally sorted in ascending item value order.
294  *
295  * This function returns the pxOwner member of the first item in the list.
296  * The pxOwner parameter of a list item is a pointer to the object that owns
297  * the list item. In the scheduler this is normally a task control block.
298  * The pxOwner parameter effectively creates a two way link between the list
299  * item and its owner.
300  *
301  * @param pxList The list from which the owner of the head item is to be
302  * returned.
303  *
304  * \page listGET_OWNER_OF_HEAD_ENTRY listGET_OWNER_OF_HEAD_ENTRY
305  * \ingroup LinkedList
306  */
307 #define listGET_OWNER_OF_HEAD_ENTRY( pxList ) ( (&( ( pxList )->xListEnd ))->pxNext->pvOwner )
308 
309 /*
310  * Check to see if a list item is within a list. The list item maintains a
311  * "container" pointer that points to the list it is in. All this macro does
312  * is check to see if the container and the list match.
313  *
314  * @param pxList The list we want to know if the list item is within.
315  * @param pxListItem The list item we want to know if is in the list.
316  * @return pdTRUE if the list item is in the list, otherwise pdFALSE.
317  */
318 #define listIS_CONTAINED_WITHIN( pxList, pxListItem ) ( ( BaseType_t ) ( ( pxListItem )->pvContainer == ( void * ) ( pxList ) ) )
319 
320 /*
321  * Return the list a list item is contained within (referenced from).
322  *
323  * @param pxListItem The list item being queried.
324  * @return A pointer to the List_t object that references the pxListItem
325  */
326 #define listLIST_ITEM_CONTAINER( pxListItem ) ( ( pxListItem )->pvContainer )
327 
328 /*
329  * This provides a crude means of knowing if a list has been initialised, as
330  * pxList->xListEnd.xItemValue is set to portMAX_DELAY by the vListInitialise()
331  * function.
332  */
333 #define listLIST_IS_INITIALISED( pxList ) ( ( pxList )->xListEnd.xItemValue == portMAX_DELAY )
334 
335 /*
336  * Must be called before a list is used! This initialises all the members
337  * of the list structure and inserts the xListEnd item into the list as a
338  * marker to the back of the list.
339  *
340  * @param pxList Pointer to the list being initialised.
341  *
342  * \page vListInitialise vListInitialise
343  * \ingroup LinkedList
344  */
345 void vListInitialise( List_t * const pxList ) PRIVILEGED_FUNCTION;
346 
347 /*
348  * Must be called before a list item is used. This sets the list container to
349  * null so the item does not think that it is already contained in a list.
350  *
351  * @param pxItem Pointer to the list item being initialised.
352  *
353  * \page vListInitialiseItem vListInitialiseItem
354  * \ingroup LinkedList
355  */
356 void vListInitialiseItem( ListItem_t * const pxItem ) PRIVILEGED_FUNCTION;
357 
358 /*
359  * Insert a list item into a list. The item will be inserted into the list in
360  * a position determined by its item value (descending item value order).
361  *
362  * @param pxList The list into which the item is to be inserted.
363  *
364  * @param pxNewListItem The item that is to be placed in the list.
365  *
366  * \page vListInsert vListInsert
367  * \ingroup LinkedList
368  */
369 void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) PRIVILEGED_FUNCTION;
370 
371 /*
372  * Insert a list item into a list. The item will be inserted in a position
373  * such that it will be the last item within the list returned by multiple
374  * calls to listGET_OWNER_OF_NEXT_ENTRY.
375  *
376  * The list member pxIndex is used to walk through a list. Calling
377  * listGET_OWNER_OF_NEXT_ENTRY increments pxIndex to the next item in the list.
378  * Placing an item in a list using vListInsertEnd effectively places the item
379  * in the list position pointed to by pxIndex. This means that every other
380  * item within the list will be returned by listGET_OWNER_OF_NEXT_ENTRY before
381  * the pxIndex parameter again points to the item being inserted.
382  *
383  * @param pxList The list into which the item is to be inserted.
384  *
385  * @param pxNewListItem The list item to be inserted into the list.
386  *
387  * \page vListInsertEnd vListInsertEnd
388  * \ingroup LinkedList
389  */
390 void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) PRIVILEGED_FUNCTION;
391 
392 /*
393  * Remove an item from a list. The list item has a pointer to the list that
394  * it is in, so only the list item need be passed into the function.
395  *
396  * @param uxListRemove The item to be removed. The item will remove itself from
397  * the list pointed to by it's pxContainer parameter.
398  *
399  * @return The number of items that remain in the list after the list item has
400  * been removed.
401  *
402  * \page uxListRemove uxListRemove
403  * \ingroup LinkedList
404  */
405 UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) PRIVILEGED_FUNCTION;
406 
407 #ifdef __cplusplus
408 }
409 #endif
410 
411 #endif
412 
Thread_ready
Thread_t * Thread_ready
Definition: HeiOS_Thread.c:22
listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE
#define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE(pxItem)
Definition: list.h:112
listTEST_LIST_ITEM_INTEGRITY
#define listTEST_LIST_ITEM_INTEGRITY(pxItem)
Definition: list.h:115
thread_resume
void thread_resume(Thread_t *Thread)
Diese Funktion fügt den übergebenen Thread zur Ready-Liste hinzu.
Definition: HeiOS_Thread.c:282
xLIST::pxIndex
ListItem_t *configLIST_VOLATILE pxIndex
Definition: list.h:168
xLIST_ITEM::pvOwner
void * pvOwner
Definition: list.h:146
portMAX_DELAY
#define portMAX_DELAY
Definition: portmacro.h:65
Thread_run
Thread_t * Thread_run
Definition: HeiOS_Thread.c:26
task.h
xLIST
Definition: list.h:165
BUTTON_T6
#define BUTTON_T6
Definition: AppBoard2Buttons.h:29
thread_suspend
void thread_suspend(Thread_t *Thread)
Diese Funktion entfernt einen Thread von der Ready-Liste und löst gegebenenfalls einen Kontextwechsel au...
Definition: HeiOS_Thread.c:264
configTOTAL_HEAP_SIZE
#define configTOTAL_HEAP_SIZE
Definition: FreeRTOSConfig.h:33
BUTTON_T3
#define BUTTON_T3
Definition: AppBoard2Buttons.h:26
vPortFree
void vPortFree(void *pv)
Definition: heap_1.c:123
portBYTE_ALIGNMENT_MASK
#define portBYTE_ALIGNMENT_MASK
Definition: portable.h:65
vListInitialise
void vListInitialise(List_t *const pxList)
Definition: list.c:38
ES2_V4_app.h
global header file for project
SVC_Handler
__asm void SVC_Handler(void)
Diese Funktion ermittelt mithile von embedded Assembler den verwendeten Stackpointer.
Definition: HeiOS_Thread.c:317
xMINI_LIST_ITEM::pxPrevious
struct xLIST_ITEM *configLIST_VOLATILE pxPrevious
Definition: list.h:157
IdleThread
void IdleThread(void)
Diese Funktion durchläuft eine Endlosschleife und sorgt für einen definierten Zustand, falls kein Thread für die...
Definition: HeiOS_Thread.c:562
xLIST_ITEM
Definition: list.h:141
xMINI_LIST_ITEM
Definition: list.h:153
xQueueDisplay
QueueHandle_t xQueueDisplay
Definition: Globals.c:15
xQueueTape
QueueHandle_t xQueueTape
Definition: Globals.c:14
uxListRemove
UBaseType_t uxListRemove(ListItem_t *const pxItemToRemove)
Definition: list.c:171
xQueueVCR
QueueHandle_t xQueueVCR
Definition: Globals.c:13
traceMALLOC
#define traceMALLOC(pvAddress, uiSize)
Definition: FreeRTOS.h:549
fpoutputidle
void(* fpoutputidle)(void)
Definition: HeiOS_Thread.c:14
SVC_Handler_service
void SVC_Handler_service(uint32_t *svc_args)
Diese Funktion dient als API, um Funktionen im priviligierten Modus ausführen zu können. Diese Funktion bes...
Definition: HeiOS_Thread.c:337
vTaskSuspendAll
void vTaskSuspendAll(void) PRIVILEGED_FUNCTION
Definition: tasks.c:2031
BUTTON_T7
#define BUTTON_T7
Definition: AppBoard2Buttons.h:30
PendSV_Handler
void PendSV_Handler(void)
Diese Funktion führt den Kontextwechsel aus.
Definition: HeiOS_Thread.c:411
xMINI_LIST_ITEM::pxNext
struct xLIST_ITEM *configLIST_VOLATILE pxNext
Definition: list.h:156
xMINI_LIST_ITEM::xItemValue
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE configLIST_VOLATILE TickType_t xItemValue
Definition: list.h:155
PRIVILEGED_FUNCTION
#define PRIVILEGED_FUNCTION
Definition: mpu_wrappers.h:174
TickType_t
uint32_t TickType_t
Definition: portmacro.h:64
xLIST_ITEM::pvContainer
void *configLIST_VOLATILE pvContainer
Definition: list.h:147
vListInsert
void vListInsert(List_t *const pxList, ListItem_t *const pxNewListItem) PRIVILEGED_FUNCTION
Definition: list.c:104
BUTTON_T5
#define BUTTON_T5
Definition: AppBoard2Buttons.h:28
portBYTE_ALIGNMENT
#define portBYTE_ALIGNMENT
Definition: portmacro.h:76
vListInsertEnd
void vListInsertEnd(List_t *const pxList, ListItem_t *const pxNewListItem)
Definition: list.c:75
load_R4toR11
__asm void load_R4toR11(void)
Diese Funktion ladet die Register R4-R8 mit Inline-Assembler.
Definition: HeiOS_Thread.c:491
UBaseType_t
unsigned long UBaseType_t
Definition: portmacro.h:58
setfpoutoutidle
void setfpoutoutidle(void(*fp)(void))
Definition: HeiOS_Thread.c:29
uxListRemove
UBaseType_t uxListRemove(ListItem_t *const pxItemToRemove) PRIVILEGED_FUNCTION
Definition: list.c:171
vPortInitialiseBlocks
void vPortInitialiseBlocks(void)
Definition: heap_1.c:135
IDLE_Thread
Thread_IDLE_t IDLE_Thread
Definition: HeiOS_Thread.c:19
listSECOND_LIST_INTEGRITY_CHECK_VALUE
#define listSECOND_LIST_INTEGRITY_CHECK_VALUE
Definition: list.h:110
Thread_init
void Thread_init(Thread_t *Thread, void *stack, uint32_t stack_size, char name[], void(*pfunc)(), uint32_t executiontime, uint8_t priority)
Diese Funktion initialisert einen Thread und fügt ihn der Ready-Liste hinzu.
Definition: HeiOS_Thread.c:51
ucHeap
static uint8_t ucHeap[configTOTAL_HEAP_SIZE]
Definition: heap_1.c:63
thread_delay
void thread_delay(uint32_t tick)
Diese Funktion entfernt den übergebenen Thread von der Ready-Liste und fügt ihn der Sleep-Liste hinzu....
Definition: HeiOS_Thread.c:300
portPOINTER_SIZE_TYPE
#define portPOINTER_SIZE_TYPE
Definition: FreeRTOS.h:289
vListInsert
void vListInsert(List_t *const pxList, ListItem_t *const pxNewListItem)
Definition: list.c:104
BUTTON_T4
#define BUTTON_T4
Definition: AppBoard2Buttons.h:27
BUTTON_T2
#define BUTTON_T2
Definition: AppBoard2Buttons.h:25
FreeRTOS.h
configLIST_VOLATILE
#define configLIST_VOLATILE
Definition: list.h:93
xNextFreeByte
static size_t xNextFreeByte
Definition: heap_1.c:67
vListInitialise
void vListInitialise(List_t *const pxList) PRIVILEGED_FUNCTION
Definition: list.c:38
u32AppBoard2ButtonsGetState
uint32_t u32AppBoard2ButtonsGetState(void)
Returns the pressed Buttons (bit coded see AppBoard2Buttons.h)
Definition: AppBoard2Buttons.c:85
vListInitialiseItem
void vListInitialiseItem(ListItem_t *const pxItem) PRIVILEGED_FUNCTION
Definition: list.c:63
listTEST_LIST_INTEGRITY
#define listTEST_LIST_INTEGRITY(pxList)
Definition: list.h:116
update_Thread_slp
void update_Thread_slp(void)
Diese Funktion aktualisiert die Verzögerungszeit der Threads.
Definition: HeiOS_Thread.c:578
BUTTON_T1
#define BUTTON_T1
Definition: AppBoard2Buttons.h:24
BUTTON_T0
#define BUTTON_T0
Definition: AppBoard2Buttons.h:23
xLIST::uxNumberOfItems
listFIRST_LIST_INTEGRITY_CHECK_VALUE volatile UBaseType_t uxNumberOfItems
Definition: list.h:167
SystemCoreClock
uint32_t SystemCoreClock
Definition: system_LPC17xx.c:431
QueueHandle_t
void * QueueHandle_t
Definition: queue.h:47
Thread_slp
Thread_t * Thread_slp
Definition: HeiOS_Thread.c:24
priv_thread_remove
uint8_t priv_thread_remove(Thread_t **root, Thread_t *Thread)
Diese Funktion entfernt das Threadobjekt aus der Liste.
Definition: HeiOS_Thread.c:230
xPortGetFreeHeapSize
size_t xPortGetFreeHeapSize(void)
Definition: heap_1.c:142
xLIST::xListEnd
MiniListItem_t xListEnd
Definition: list.h:169
listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
#define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE(pxItem)
Definition: list.h:111
TIMER0_IRQHandler
void TIMER0_IRQHandler(void)
ISR of timer0, called every 20 millisecond.
Definition: Interrupt.c:21
vListInsertEnd
void vListInsertEnd(List_t *const pxList, ListItem_t *const pxNewListItem) PRIVILEGED_FUNCTION
Definition: list.c:75
listSET_LIST_INTEGRITY_CHECK_1_VALUE
#define listSET_LIST_INTEGRITY_CHECK_1_VALUE(pxList)
Definition: list.h:113
save_R4toR11
__asm void save_R4toR11(void)
Diese Funktion sichert die Register R4-R8 mit Inline-Assembler.
Definition: HeiOS_Thread.c:473
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
#define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
Definition: list.h:107
mtCOVERAGE_TEST_DELAY
#define mtCOVERAGE_TEST_DELAY()
Definition: FreeRTOS.h:791
listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE
#define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE
Definition: list.h:108
xLIST_ITEM::xItemValue
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE configLIST_VOLATILE TickType_t xItemValue
Definition: list.h:143
xTaskResumeAll
BaseType_t xTaskResumeAll(void) PRIVILEGED_FUNCTION
Definition: tasks.c:2104
configASSERT
#define configASSERT(x)
Definition: FreeRTOS.h:235
list.h
configADJUSTED_HEAP_SIZE
#define configADJUSTED_HEAP_SIZE
Definition: heap_1.c:54
xLIST_ITEM::pxPrevious
struct xLIST_ITEM *configLIST_VOLATILE pxPrevious
Definition: list.h:145
List_t
struct xLIST List_t
OS_Start_Scheduler
void OS_Start_Scheduler(void)
Diese Funktion initialisiert das OS und sorgt anschließend für den Wechsel in den Idlethread.
Definition: HeiOS_Thread.c:513
update_executiontime
void update_executiontime(void)
Diese Funktion aktualisiert die Ausführungszeit der Threads.
Definition: HeiOS_Thread.c:613
xLIST_ITEM::pxNext
struct xLIST_ITEM *configLIST_VOLATILE pxNext
Definition: list.h:144
priv_thread_sort_add
uint8_t priv_thread_sort_add(Thread_t **root, Thread_t *Thread)
Mithilfe der Funktion werden die Thread-Objekte in einer einfach verketteten Liste angeordnet....
Definition: HeiOS_Thread.c:180
SysTick_Handler
void SysTick_Handler(void)
Diese Funktion wird in regelmäßigen Abständen ausgeführt.
Definition: HeiOS_Thread.c:380
listFIRST_LIST_INTEGRITY_CHECK_VALUE
#define listFIRST_LIST_INTEGRITY_CHECK_VALUE
Definition: list.h:109
listSET_LIST_INTEGRITY_CHECK_2_VALUE
#define listSET_LIST_INTEGRITY_CHECK_2_VALUE(pxList)
Definition: list.h:114
vListInitialiseItem
void vListInitialiseItem(ListItem_t *const pxItem)
Definition: list.c:63
mtCOVERAGE_TEST_MARKER
#define mtCOVERAGE_TEST_MARKER()
Definition: FreeRTOS.h:787
pvPortMalloc
void * pvPortMalloc(size_t xWantedSize)
Definition: heap_1.c:71