1 /*
2 * FreeRTOS Kernel <DEVELOPMENT BRANCH>
3 * Copyright 2020 Cambridge Consultants Ltd.
4 *
5 * SPDX-License-Identifier: MIT
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of
8 * this software and associated documentation files (the "Software"), to deal in
9 * the Software without restriction, including without limitation the rights to
10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 * the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * https://www.FreeRTOS.org
25 * https://github.com/FreeRTOS
26 *
27 */
28
29
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #include <limits.h>
38
39 /*-----------------------------------------------------------
40 * Port specific definitions.
41 *
42 * The settings in this file configure FreeRTOS correctly for the
43 * given hardware and compiler.
44 *
45 * These settings should not be altered.
46 *-----------------------------------------------------------
47 */
48
49 /* Type definitions. */
58
62
65
67
68 /*-----------------------------------------------------------*/
69
70 /* Architecture specifics. */
76 /*-----------------------------------------------------------*/
77
78 /* Scheduler utilities. */
79 extern void vPortYield( void );
80
82
85 /*-----------------------------------------------------------*/
86
87 /* Critical section management. */
88 extern void vPortDisableInterrupts( void );
89 extern void vPortEnableInterrupts( void );
92
95
104
105 /*-----------------------------------------------------------*/
106
107 extern void vPortThreadDying( void *pxTaskToDelete, volatile
BaseType_t *pxPendYield );
108 extern void vPortCancelThread( void *pxTaskToDelete );
109 #define
portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxPendYield ) vPortThreadDying( ( pvTaskToDelete ), ( pxPendYield ) )
111 /*-----------------------------------------------------------*/
112
115 /*-----------------------------------------------------------*/
116
117 /*
118 * Tasks run in their own pthreads and context switches between them
119 * are always a full memory barrier. ISRs are emulated as signals
120 * which also imply a full memory barrier.
121 *
122 * Thus, only a compilier barrier is needed to prevent the compiler
123 * reordering.
124 */
126
127 extern unsigned long ulPortGetRunTime( void );
130
131 #ifdef __cplusplus
132 }
133 #endif
134
135 #endif /* PORTMACRO_H */