chokchai Hantanong
/
RtosTest
LED Fork
Fork of RtosTest by
scmRTOS/Common/scmRTOS_defs.h@0:331db0b44b67, 2010-09-21 (annotated)
- Committer:
- mbed714
- Date:
- Tue Sep 21 19:48:05 2010 +0000
- Revision:
- 0:331db0b44b67
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed714 | 0:331db0b44b67 | 1 | //****************************************************************************** |
mbed714 | 0:331db0b44b67 | 2 | //* |
mbed714 | 0:331db0b44b67 | 3 | //* FULLNAME: Single-Chip Microcontroller Real-Time Operating System |
mbed714 | 0:331db0b44b67 | 4 | //* |
mbed714 | 0:331db0b44b67 | 5 | //* NICKNAME: scmRTOS |
mbed714 | 0:331db0b44b67 | 6 | //* |
mbed714 | 0:331db0b44b67 | 7 | //* PURPOSE: Macros And Common Definitions |
mbed714 | 0:331db0b44b67 | 8 | //* |
mbed714 | 0:331db0b44b67 | 9 | //* Version: 3.10 |
mbed714 | 0:331db0b44b67 | 10 | //* |
mbed714 | 0:331db0b44b67 | 11 | //* $Revision: 256 $ |
mbed714 | 0:331db0b44b67 | 12 | //* $Date:: 2010-01-22 #$ |
mbed714 | 0:331db0b44b67 | 13 | //* |
mbed714 | 0:331db0b44b67 | 14 | //* Copyright (c) 2003-2010, Harry E. Zhurov |
mbed714 | 0:331db0b44b67 | 15 | //* |
mbed714 | 0:331db0b44b67 | 16 | //* Permission is hereby granted, free of charge, to any person |
mbed714 | 0:331db0b44b67 | 17 | //* obtaining a copy of this software and associated documentation |
mbed714 | 0:331db0b44b67 | 18 | //* files (the "Software"), to deal in the Software without restriction, |
mbed714 | 0:331db0b44b67 | 19 | //* including without limitation the rights to use, copy, modify, merge, |
mbed714 | 0:331db0b44b67 | 20 | //* publish, distribute, sublicense, and/or sell copies of the Software, |
mbed714 | 0:331db0b44b67 | 21 | //* and to permit persons to whom the Software is furnished to do so, |
mbed714 | 0:331db0b44b67 | 22 | //* subject to the following conditions: |
mbed714 | 0:331db0b44b67 | 23 | //* |
mbed714 | 0:331db0b44b67 | 24 | //* The above copyright notice and this permission notice shall be included |
mbed714 | 0:331db0b44b67 | 25 | //* in all copies or substantial portions of the Software. |
mbed714 | 0:331db0b44b67 | 26 | //* |
mbed714 | 0:331db0b44b67 | 27 | //* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
mbed714 | 0:331db0b44b67 | 28 | //* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
mbed714 | 0:331db0b44b67 | 29 | //* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
mbed714 | 0:331db0b44b67 | 30 | //* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
mbed714 | 0:331db0b44b67 | 31 | //* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
mbed714 | 0:331db0b44b67 | 32 | //* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH |
mbed714 | 0:331db0b44b67 | 33 | //* THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
mbed714 | 0:331db0b44b67 | 34 | //* |
mbed714 | 0:331db0b44b67 | 35 | //* ================================================================= |
mbed714 | 0:331db0b44b67 | 36 | //* See http://scmrtos.sourceforge.net for documentation, latest |
mbed714 | 0:331db0b44b67 | 37 | //* information, license and contact details. |
mbed714 | 0:331db0b44b67 | 38 | //* ================================================================= |
mbed714 | 0:331db0b44b67 | 39 | //* |
mbed714 | 0:331db0b44b67 | 40 | //****************************************************************************** |
mbed714 | 0:331db0b44b67 | 41 | |
mbed714 | 0:331db0b44b67 | 42 | #ifndef scmRTOS_DEFS_H |
mbed714 | 0:331db0b44b67 | 43 | #define scmRTOS_DEFS_H |
mbed714 | 0:331db0b44b67 | 44 | |
mbed714 | 0:331db0b44b67 | 45 | #include <commdefs.h> |
mbed714 | 0:331db0b44b67 | 46 | |
mbed714 | 0:331db0b44b67 | 47 | //------------------------------------------------------------------------------ |
mbed714 | 0:331db0b44b67 | 48 | |
mbed714 | 0:331db0b44b67 | 49 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 50 | // |
mbed714 | 0:331db0b44b67 | 51 | // |
mbed714 | 0:331db0b44b67 | 52 | /// Macro for Channel Type definition |
mbed714 | 0:331db0b44b67 | 53 | // |
mbed714 | 0:331db0b44b67 | 54 | // |
mbed714 | 0:331db0b44b67 | 55 | #define DefineChannel(Name, Capacity) \ |
mbed714 | 0:331db0b44b67 | 56 | class Name : public OS::TChannel \ |
mbed714 | 0:331db0b44b67 | 57 | { \ |
mbed714 | 0:331db0b44b67 | 58 | public: \ |
mbed714 | 0:331db0b44b67 | 59 | Name() : OS::TChannel(buf, sizeof(buf)) { } \ |
mbed714 | 0:331db0b44b67 | 60 | \ |
mbed714 | 0:331db0b44b67 | 61 | private: \ |
mbed714 | 0:331db0b44b67 | 62 | byte buf[Capacity]; \ |
mbed714 | 0:331db0b44b67 | 63 | \ |
mbed714 | 0:331db0b44b67 | 64 | } |
mbed714 | 0:331db0b44b67 | 65 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 66 | // |
mbed714 | 0:331db0b44b67 | 67 | // Check CONFIG Macro Definitions |
mbed714 | 0:331db0b44b67 | 68 | // |
mbed714 | 0:331db0b44b67 | 69 | // |
mbed714 | 0:331db0b44b67 | 70 | |
mbed714 | 0:331db0b44b67 | 71 | //----------------- scmRTOS_SYSTIMER_NEST_INTS_ENABLE ------------------------- |
mbed714 | 0:331db0b44b67 | 72 | #ifndef scmRTOS_SYSTIMER_NEST_INTS_ENABLE |
mbed714 | 0:331db0b44b67 | 73 | #error "Error: Config macro scmRTOS_SYSTIMER_NEST_INTS_ENABLE must be defined!" |
mbed714 | 0:331db0b44b67 | 74 | #endif |
mbed714 | 0:331db0b44b67 | 75 | |
mbed714 | 0:331db0b44b67 | 76 | #if (scmRTOS_SYSTIMER_NEST_INTS_ENABLE < 0) || (scmRTOS_SYSTIMER_NEST_INTS_ENABLE > 1) |
mbed714 | 0:331db0b44b67 | 77 | #error "Error: scmRTOS_SYSTIMER_NEST_INTS_ENABLE must have values 0 or 1 only!" |
mbed714 | 0:331db0b44b67 | 78 | #endif |
mbed714 | 0:331db0b44b67 | 79 | |
mbed714 | 0:331db0b44b67 | 80 | //----------------- scmRTOS_SYSTEM_TICKS_ENABLE ------------------------------- |
mbed714 | 0:331db0b44b67 | 81 | #ifndef scmRTOS_SYSTEM_TICKS_ENABLE |
mbed714 | 0:331db0b44b67 | 82 | #error "Error: Config macro scmRTOS_SYSTEM_TICKS_ENABLE must be defined!" |
mbed714 | 0:331db0b44b67 | 83 | #endif |
mbed714 | 0:331db0b44b67 | 84 | |
mbed714 | 0:331db0b44b67 | 85 | #if (scmRTOS_SYSTEM_TICKS_ENABLE < 0) || (scmRTOS_SYSTEM_TICKS_ENABLE > 1) |
mbed714 | 0:331db0b44b67 | 86 | #error "Error: scmRTOS_SYSTEM_TICKS_ENABLE must have values 0 or 1 only!" |
mbed714 | 0:331db0b44b67 | 87 | #endif |
mbed714 | 0:331db0b44b67 | 88 | |
mbed714 | 0:331db0b44b67 | 89 | |
mbed714 | 0:331db0b44b67 | 90 | //----------------- scmRTOS_SYSTIMER_HOOK_ENABLE ------------------------------ |
mbed714 | 0:331db0b44b67 | 91 | #ifndef scmRTOS_SYSTIMER_HOOK_ENABLE |
mbed714 | 0:331db0b44b67 | 92 | #error "Error: Config macro scmRTOS_SYSTIMER_HOOK_ENABLE must be defined!" |
mbed714 | 0:331db0b44b67 | 93 | #endif |
mbed714 | 0:331db0b44b67 | 94 | |
mbed714 | 0:331db0b44b67 | 95 | #if (scmRTOS_SYSTIMER_HOOK_ENABLE < 0) || (scmRTOS_SYSTIMER_HOOK_ENABLE > 1) |
mbed714 | 0:331db0b44b67 | 96 | #error "Error: scmRTOS_SYSTIMER_HOOK_ENABLE must have values 0 or 1 only!" |
mbed714 | 0:331db0b44b67 | 97 | #endif |
mbed714 | 0:331db0b44b67 | 98 | |
mbed714 | 0:331db0b44b67 | 99 | //-------------- scmRTOS_CONTEXT_SWITCH_USER_HOOK_ENABLE ---------------------- |
mbed714 | 0:331db0b44b67 | 100 | #ifndef scmRTOS_CONTEXT_SWITCH_USER_HOOK_ENABLE |
mbed714 | 0:331db0b44b67 | 101 | #error "Error: Config macro scmRTOS_CONTEXT_SWITCH_USER_HOOK_ENABLE must be defined!" |
mbed714 | 0:331db0b44b67 | 102 | #endif |
mbed714 | 0:331db0b44b67 | 103 | |
mbed714 | 0:331db0b44b67 | 104 | #if (scmRTOS_CONTEXT_SWITCH_USER_HOOK_ENABLE < 0) || (scmRTOS_CONTEXT_SWITCH_USER_HOOK_ENABLE > 1) |
mbed714 | 0:331db0b44b67 | 105 | #error "Error: scmRTOS_CONTEXT_SWITCH_USER_HOOK_ENABLE must have values 0 or 1 only!" |
mbed714 | 0:331db0b44b67 | 106 | #endif |
mbed714 | 0:331db0b44b67 | 107 | |
mbed714 | 0:331db0b44b67 | 108 | //----------------- scmRTOS_IDLE_HOOK_ENABLE ---------------------------------- |
mbed714 | 0:331db0b44b67 | 109 | #ifndef scmRTOS_IDLE_HOOK_ENABLE |
mbed714 | 0:331db0b44b67 | 110 | #error "Error: Config macro scmRTOS_IDLE_HOOK_ENABLE must be defined!" |
mbed714 | 0:331db0b44b67 | 111 | #endif |
mbed714 | 0:331db0b44b67 | 112 | |
mbed714 | 0:331db0b44b67 | 113 | #if (scmRTOS_IDLE_HOOK_ENABLE < 0) || (scmRTOS_IDLE_HOOK_ENABLE > 1) |
mbed714 | 0:331db0b44b67 | 114 | #error "Error: scmRTOS_IDLE_HOOK_ENABLE must have values 0 or 1 only!" |
mbed714 | 0:331db0b44b67 | 115 | #endif |
mbed714 | 0:331db0b44b67 | 116 | |
mbed714 | 0:331db0b44b67 | 117 | //----------------- scmRTOS_CONTEXT_SWITCH_SCHEME ----------------------------- |
mbed714 | 0:331db0b44b67 | 118 | #ifndef scmRTOS_CONTEXT_SWITCH_SCHEME |
mbed714 | 0:331db0b44b67 | 119 | #error "Error: Config macro scmRTOS_CONTEXT_SWITCH_SCHEME must be defined!" |
mbed714 | 0:331db0b44b67 | 120 | #endif |
mbed714 | 0:331db0b44b67 | 121 | |
mbed714 | 0:331db0b44b67 | 122 | #if (scmRTOS_CONTEXT_SWITCH_SCHEME < 0) || (scmRTOS_CONTEXT_SWITCH_SCHEME > 1) |
mbed714 | 0:331db0b44b67 | 123 | #error "Error: scmRTOS_CONTEXT_SWITCH_SCHEME must have values 0 or 1 only!" |
mbed714 | 0:331db0b44b67 | 124 | #endif |
mbed714 | 0:331db0b44b67 | 125 | |
mbed714 | 0:331db0b44b67 | 126 | |
mbed714 | 0:331db0b44b67 | 127 | //----------------- scmRTOS_PRIORITY_ORDER ------------------------------------ |
mbed714 | 0:331db0b44b67 | 128 | #ifndef scmRTOS_PRIORITY_ORDER |
mbed714 | 0:331db0b44b67 | 129 | #error "Error: Config macro scmRTOS_PRIORITY_ORDER must be defined!" |
mbed714 | 0:331db0b44b67 | 130 | #endif |
mbed714 | 0:331db0b44b67 | 131 | |
mbed714 | 0:331db0b44b67 | 132 | #if (scmRTOS_PRIORITY_ORDER < 0) || (scmRTOS_PRIORITY_ORDER > 1) |
mbed714 | 0:331db0b44b67 | 133 | #error "Error: scmRTOS_PRIORITY_ORDER must have values 0 or 1 only!" |
mbed714 | 0:331db0b44b67 | 134 | #endif |
mbed714 | 0:331db0b44b67 | 135 | |
mbed714 | 0:331db0b44b67 | 136 | //----------------- User Hooks inlining ------------------------------------ |
mbed714 | 0:331db0b44b67 | 137 | #ifndef INLINE_SYS_TIMER_HOOK |
mbed714 | 0:331db0b44b67 | 138 | #define INLINE_SYS_TIMER_HOOK |
mbed714 | 0:331db0b44b67 | 139 | #endif |
mbed714 | 0:331db0b44b67 | 140 | |
mbed714 | 0:331db0b44b67 | 141 | #ifndef INLINE_CONTEXT_SWITCH_HOOK |
mbed714 | 0:331db0b44b67 | 142 | #define INLINE_CONTEXT_SWITCH_HOOK |
mbed714 | 0:331db0b44b67 | 143 | #endif |
mbed714 | 0:331db0b44b67 | 144 | |
mbed714 | 0:331db0b44b67 | 145 | |
mbed714 | 0:331db0b44b67 | 146 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 147 | // |
mbed714 | 0:331db0b44b67 | 148 | /// Priority and process map type definitions |
mbed714 | 0:331db0b44b67 | 149 | // |
mbed714 | 0:331db0b44b67 | 150 | // |
mbed714 | 0:331db0b44b67 | 151 | namespace OS |
mbed714 | 0:331db0b44b67 | 152 | { |
mbed714 | 0:331db0b44b67 | 153 | #if scmRTOS_PROCESS_COUNT < 8 |
mbed714 | 0:331db0b44b67 | 154 | typedef byte TProcessMap; |
mbed714 | 0:331db0b44b67 | 155 | #elif scmRTOS_PROCESS_COUNT < 16 |
mbed714 | 0:331db0b44b67 | 156 | typedef word TProcessMap; |
mbed714 | 0:331db0b44b67 | 157 | #else |
mbed714 | 0:331db0b44b67 | 158 | typedef dword TProcessMap; |
mbed714 | 0:331db0b44b67 | 159 | #endif |
mbed714 | 0:331db0b44b67 | 160 | //------------------------------------------------------ |
mbed714 | 0:331db0b44b67 | 161 | #if scmRTOS_PRIORITY_ORDER == 0 |
mbed714 | 0:331db0b44b67 | 162 | enum TPriority { |
mbed714 | 0:331db0b44b67 | 163 | #if scmRTOS_PROCESS_COUNT > 0 |
mbed714 | 0:331db0b44b67 | 164 | pr0, |
mbed714 | 0:331db0b44b67 | 165 | #endif |
mbed714 | 0:331db0b44b67 | 166 | #if scmRTOS_PROCESS_COUNT > 1 |
mbed714 | 0:331db0b44b67 | 167 | pr1, |
mbed714 | 0:331db0b44b67 | 168 | #endif |
mbed714 | 0:331db0b44b67 | 169 | #if scmRTOS_PROCESS_COUNT > 2 |
mbed714 | 0:331db0b44b67 | 170 | pr2, |
mbed714 | 0:331db0b44b67 | 171 | #endif |
mbed714 | 0:331db0b44b67 | 172 | #if scmRTOS_PROCESS_COUNT > 3 |
mbed714 | 0:331db0b44b67 | 173 | pr3, |
mbed714 | 0:331db0b44b67 | 174 | #endif |
mbed714 | 0:331db0b44b67 | 175 | #if scmRTOS_PROCESS_COUNT > 4 |
mbed714 | 0:331db0b44b67 | 176 | pr4, |
mbed714 | 0:331db0b44b67 | 177 | #endif |
mbed714 | 0:331db0b44b67 | 178 | #if scmRTOS_PROCESS_COUNT > 5 |
mbed714 | 0:331db0b44b67 | 179 | pr5, |
mbed714 | 0:331db0b44b67 | 180 | #endif |
mbed714 | 0:331db0b44b67 | 181 | #if scmRTOS_PROCESS_COUNT > 6 |
mbed714 | 0:331db0b44b67 | 182 | pr6, |
mbed714 | 0:331db0b44b67 | 183 | #endif |
mbed714 | 0:331db0b44b67 | 184 | #if scmRTOS_PROCESS_COUNT > 7 |
mbed714 | 0:331db0b44b67 | 185 | pr7, |
mbed714 | 0:331db0b44b67 | 186 | #endif |
mbed714 | 0:331db0b44b67 | 187 | #if scmRTOS_PROCESS_COUNT > 8 |
mbed714 | 0:331db0b44b67 | 188 | pr8, |
mbed714 | 0:331db0b44b67 | 189 | #endif |
mbed714 | 0:331db0b44b67 | 190 | #if scmRTOS_PROCESS_COUNT > 9 |
mbed714 | 0:331db0b44b67 | 191 | pr9, |
mbed714 | 0:331db0b44b67 | 192 | #endif |
mbed714 | 0:331db0b44b67 | 193 | #if scmRTOS_PROCESS_COUNT > 10 |
mbed714 | 0:331db0b44b67 | 194 | pr10, |
mbed714 | 0:331db0b44b67 | 195 | #endif |
mbed714 | 0:331db0b44b67 | 196 | #if scmRTOS_PROCESS_COUNT > 11 |
mbed714 | 0:331db0b44b67 | 197 | pr11, |
mbed714 | 0:331db0b44b67 | 198 | #endif |
mbed714 | 0:331db0b44b67 | 199 | #if scmRTOS_PROCESS_COUNT > 12 |
mbed714 | 0:331db0b44b67 | 200 | pr12, |
mbed714 | 0:331db0b44b67 | 201 | #endif |
mbed714 | 0:331db0b44b67 | 202 | #if scmRTOS_PROCESS_COUNT > 13 |
mbed714 | 0:331db0b44b67 | 203 | pr13, |
mbed714 | 0:331db0b44b67 | 204 | #endif |
mbed714 | 0:331db0b44b67 | 205 | #if scmRTOS_PROCESS_COUNT > 14 |
mbed714 | 0:331db0b44b67 | 206 | pr14, |
mbed714 | 0:331db0b44b67 | 207 | #endif |
mbed714 | 0:331db0b44b67 | 208 | #if scmRTOS_PROCESS_COUNT > 15 |
mbed714 | 0:331db0b44b67 | 209 | pr15, |
mbed714 | 0:331db0b44b67 | 210 | #endif |
mbed714 | 0:331db0b44b67 | 211 | #if scmRTOS_PROCESS_COUNT > 16 |
mbed714 | 0:331db0b44b67 | 212 | pr16, |
mbed714 | 0:331db0b44b67 | 213 | #endif |
mbed714 | 0:331db0b44b67 | 214 | #if scmRTOS_PROCESS_COUNT > 17 |
mbed714 | 0:331db0b44b67 | 215 | pr17, |
mbed714 | 0:331db0b44b67 | 216 | #endif |
mbed714 | 0:331db0b44b67 | 217 | #if scmRTOS_PROCESS_COUNT > 18 |
mbed714 | 0:331db0b44b67 | 218 | pr18, |
mbed714 | 0:331db0b44b67 | 219 | #endif |
mbed714 | 0:331db0b44b67 | 220 | #if scmRTOS_PROCESS_COUNT > 19 |
mbed714 | 0:331db0b44b67 | 221 | pr19, |
mbed714 | 0:331db0b44b67 | 222 | #endif |
mbed714 | 0:331db0b44b67 | 223 | #if scmRTOS_PROCESS_COUNT > 20 |
mbed714 | 0:331db0b44b67 | 224 | pr20, |
mbed714 | 0:331db0b44b67 | 225 | #endif |
mbed714 | 0:331db0b44b67 | 226 | #if scmRTOS_PROCESS_COUNT > 21 |
mbed714 | 0:331db0b44b67 | 227 | pr21, |
mbed714 | 0:331db0b44b67 | 228 | #endif |
mbed714 | 0:331db0b44b67 | 229 | #if scmRTOS_PROCESS_COUNT > 22 |
mbed714 | 0:331db0b44b67 | 230 | pr22, |
mbed714 | 0:331db0b44b67 | 231 | #endif |
mbed714 | 0:331db0b44b67 | 232 | #if scmRTOS_PROCESS_COUNT > 23 |
mbed714 | 0:331db0b44b67 | 233 | pr23, |
mbed714 | 0:331db0b44b67 | 234 | #endif |
mbed714 | 0:331db0b44b67 | 235 | #if scmRTOS_PROCESS_COUNT > 24 |
mbed714 | 0:331db0b44b67 | 236 | pr24, |
mbed714 | 0:331db0b44b67 | 237 | #endif |
mbed714 | 0:331db0b44b67 | 238 | #if scmRTOS_PROCESS_COUNT > 25 |
mbed714 | 0:331db0b44b67 | 239 | pr25, |
mbed714 | 0:331db0b44b67 | 240 | #endif |
mbed714 | 0:331db0b44b67 | 241 | #if scmRTOS_PROCESS_COUNT > 26 |
mbed714 | 0:331db0b44b67 | 242 | pr26, |
mbed714 | 0:331db0b44b67 | 243 | #endif |
mbed714 | 0:331db0b44b67 | 244 | #if scmRTOS_PROCESS_COUNT > 27 |
mbed714 | 0:331db0b44b67 | 245 | pr27, |
mbed714 | 0:331db0b44b67 | 246 | #endif |
mbed714 | 0:331db0b44b67 | 247 | #if scmRTOS_PROCESS_COUNT > 28 |
mbed714 | 0:331db0b44b67 | 248 | pr28, |
mbed714 | 0:331db0b44b67 | 249 | #endif |
mbed714 | 0:331db0b44b67 | 250 | #if scmRTOS_PROCESS_COUNT > 29 |
mbed714 | 0:331db0b44b67 | 251 | pr29, |
mbed714 | 0:331db0b44b67 | 252 | #endif |
mbed714 | 0:331db0b44b67 | 253 | #if scmRTOS_PROCESS_COUNT > 30 |
mbed714 | 0:331db0b44b67 | 254 | pr30, |
mbed714 | 0:331db0b44b67 | 255 | #endif |
mbed714 | 0:331db0b44b67 | 256 | #if (scmRTOS_PROCESS_COUNT > 31) || (scmRTOS_PROCESS_COUNT < 1) |
mbed714 | 0:331db0b44b67 | 257 | #error "Invalid Process Count specification! Must be from 1 to 31." |
mbed714 | 0:331db0b44b67 | 258 | #endif |
mbed714 | 0:331db0b44b67 | 259 | prIDLE |
mbed714 | 0:331db0b44b67 | 260 | }; |
mbed714 | 0:331db0b44b67 | 261 | #else // scmRTOS_PRIORITY_ORDER == 1 |
mbed714 | 0:331db0b44b67 | 262 | enum TPriority { |
mbed714 | 0:331db0b44b67 | 263 | prIDLE, |
mbed714 | 0:331db0b44b67 | 264 | #if scmRTOS_PROCESS_COUNT > 30 |
mbed714 | 0:331db0b44b67 | 265 | pr30, |
mbed714 | 0:331db0b44b67 | 266 | #endif |
mbed714 | 0:331db0b44b67 | 267 | #if scmRTOS_PROCESS_COUNT > 29 |
mbed714 | 0:331db0b44b67 | 268 | pr29, |
mbed714 | 0:331db0b44b67 | 269 | #endif |
mbed714 | 0:331db0b44b67 | 270 | #if scmRTOS_PROCESS_COUNT > 28 |
mbed714 | 0:331db0b44b67 | 271 | pr28, |
mbed714 | 0:331db0b44b67 | 272 | #endif |
mbed714 | 0:331db0b44b67 | 273 | #if scmRTOS_PROCESS_COUNT > 27 |
mbed714 | 0:331db0b44b67 | 274 | pr27, |
mbed714 | 0:331db0b44b67 | 275 | #endif |
mbed714 | 0:331db0b44b67 | 276 | #if scmRTOS_PROCESS_COUNT > 26 |
mbed714 | 0:331db0b44b67 | 277 | pr26, |
mbed714 | 0:331db0b44b67 | 278 | #endif |
mbed714 | 0:331db0b44b67 | 279 | #if scmRTOS_PROCESS_COUNT > 25 |
mbed714 | 0:331db0b44b67 | 280 | pr25, |
mbed714 | 0:331db0b44b67 | 281 | #endif |
mbed714 | 0:331db0b44b67 | 282 | #if scmRTOS_PROCESS_COUNT > 24 |
mbed714 | 0:331db0b44b67 | 283 | pr24, |
mbed714 | 0:331db0b44b67 | 284 | #endif |
mbed714 | 0:331db0b44b67 | 285 | #if scmRTOS_PROCESS_COUNT > 23 |
mbed714 | 0:331db0b44b67 | 286 | pr23, |
mbed714 | 0:331db0b44b67 | 287 | #endif |
mbed714 | 0:331db0b44b67 | 288 | #if scmRTOS_PROCESS_COUNT > 22 |
mbed714 | 0:331db0b44b67 | 289 | pr22, |
mbed714 | 0:331db0b44b67 | 290 | #endif |
mbed714 | 0:331db0b44b67 | 291 | #if scmRTOS_PROCESS_COUNT > 21 |
mbed714 | 0:331db0b44b67 | 292 | pr21, |
mbed714 | 0:331db0b44b67 | 293 | #endif |
mbed714 | 0:331db0b44b67 | 294 | #if scmRTOS_PROCESS_COUNT > 20 |
mbed714 | 0:331db0b44b67 | 295 | pr20, |
mbed714 | 0:331db0b44b67 | 296 | #endif |
mbed714 | 0:331db0b44b67 | 297 | #if scmRTOS_PROCESS_COUNT > 19 |
mbed714 | 0:331db0b44b67 | 298 | pr19, |
mbed714 | 0:331db0b44b67 | 299 | #endif |
mbed714 | 0:331db0b44b67 | 300 | #if scmRTOS_PROCESS_COUNT > 18 |
mbed714 | 0:331db0b44b67 | 301 | pr18, |
mbed714 | 0:331db0b44b67 | 302 | #endif |
mbed714 | 0:331db0b44b67 | 303 | #if scmRTOS_PROCESS_COUNT > 17 |
mbed714 | 0:331db0b44b67 | 304 | pr17, |
mbed714 | 0:331db0b44b67 | 305 | #endif |
mbed714 | 0:331db0b44b67 | 306 | #if scmRTOS_PROCESS_COUNT > 16 |
mbed714 | 0:331db0b44b67 | 307 | pr16, |
mbed714 | 0:331db0b44b67 | 308 | #endif |
mbed714 | 0:331db0b44b67 | 309 | #if scmRTOS_PROCESS_COUNT > 15 |
mbed714 | 0:331db0b44b67 | 310 | pr15, |
mbed714 | 0:331db0b44b67 | 311 | #endif |
mbed714 | 0:331db0b44b67 | 312 | #if scmRTOS_PROCESS_COUNT > 14 |
mbed714 | 0:331db0b44b67 | 313 | pr14, |
mbed714 | 0:331db0b44b67 | 314 | #endif |
mbed714 | 0:331db0b44b67 | 315 | #if scmRTOS_PROCESS_COUNT > 13 |
mbed714 | 0:331db0b44b67 | 316 | pr13, |
mbed714 | 0:331db0b44b67 | 317 | #endif |
mbed714 | 0:331db0b44b67 | 318 | #if scmRTOS_PROCESS_COUNT > 12 |
mbed714 | 0:331db0b44b67 | 319 | pr12, |
mbed714 | 0:331db0b44b67 | 320 | #endif |
mbed714 | 0:331db0b44b67 | 321 | #if scmRTOS_PROCESS_COUNT > 11 |
mbed714 | 0:331db0b44b67 | 322 | pr11, |
mbed714 | 0:331db0b44b67 | 323 | #endif |
mbed714 | 0:331db0b44b67 | 324 | #if scmRTOS_PROCESS_COUNT > 10 |
mbed714 | 0:331db0b44b67 | 325 | pr10, |
mbed714 | 0:331db0b44b67 | 326 | #endif |
mbed714 | 0:331db0b44b67 | 327 | #if scmRTOS_PROCESS_COUNT > 9 |
mbed714 | 0:331db0b44b67 | 328 | pr9, |
mbed714 | 0:331db0b44b67 | 329 | #endif |
mbed714 | 0:331db0b44b67 | 330 | #if scmRTOS_PROCESS_COUNT > 8 |
mbed714 | 0:331db0b44b67 | 331 | pr8, |
mbed714 | 0:331db0b44b67 | 332 | #endif |
mbed714 | 0:331db0b44b67 | 333 | #if scmRTOS_PROCESS_COUNT > 7 |
mbed714 | 0:331db0b44b67 | 334 | pr7, |
mbed714 | 0:331db0b44b67 | 335 | #endif |
mbed714 | 0:331db0b44b67 | 336 | #if scmRTOS_PROCESS_COUNT > 6 |
mbed714 | 0:331db0b44b67 | 337 | pr6, |
mbed714 | 0:331db0b44b67 | 338 | #endif |
mbed714 | 0:331db0b44b67 | 339 | #if scmRTOS_PROCESS_COUNT > 5 |
mbed714 | 0:331db0b44b67 | 340 | pr5, |
mbed714 | 0:331db0b44b67 | 341 | #endif |
mbed714 | 0:331db0b44b67 | 342 | #if scmRTOS_PROCESS_COUNT > 4 |
mbed714 | 0:331db0b44b67 | 343 | pr4, |
mbed714 | 0:331db0b44b67 | 344 | #endif |
mbed714 | 0:331db0b44b67 | 345 | #if scmRTOS_PROCESS_COUNT > 3 |
mbed714 | 0:331db0b44b67 | 346 | pr3, |
mbed714 | 0:331db0b44b67 | 347 | #endif |
mbed714 | 0:331db0b44b67 | 348 | #if scmRTOS_PROCESS_COUNT > 2 |
mbed714 | 0:331db0b44b67 | 349 | pr2, |
mbed714 | 0:331db0b44b67 | 350 | #endif |
mbed714 | 0:331db0b44b67 | 351 | #if scmRTOS_PROCESS_COUNT > 1 |
mbed714 | 0:331db0b44b67 | 352 | pr1, |
mbed714 | 0:331db0b44b67 | 353 | #endif |
mbed714 | 0:331db0b44b67 | 354 | #if scmRTOS_PROCESS_COUNT > 0 |
mbed714 | 0:331db0b44b67 | 355 | pr0 |
mbed714 | 0:331db0b44b67 | 356 | #endif |
mbed714 | 0:331db0b44b67 | 357 | #if (scmRTOS_PROCESS_COUNT > 31) || (scmRTOS_PROCESS_COUNT < 1) |
mbed714 | 0:331db0b44b67 | 358 | #error "Invalid Process Count specification! Must be from 1 to 31." |
mbed714 | 0:331db0b44b67 | 359 | #endif |
mbed714 | 0:331db0b44b67 | 360 | }; |
mbed714 | 0:331db0b44b67 | 361 | #endif //scmRTOS_PRIORITY_ORDER |
mbed714 | 0:331db0b44b67 | 362 | } |
mbed714 | 0:331db0b44b67 | 363 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 364 | // |
mbed714 | 0:331db0b44b67 | 365 | // Process's constructor inlining control: default behaviour |
mbed714 | 0:331db0b44b67 | 366 | // |
mbed714 | 0:331db0b44b67 | 367 | #ifndef INLINE_PROCESS_CTOR |
mbed714 | 0:331db0b44b67 | 368 | #define INLINE_PROCESS_CTOR |
mbed714 | 0:331db0b44b67 | 369 | #endif |
mbed714 | 0:331db0b44b67 | 370 | |
mbed714 | 0:331db0b44b67 | 371 | |
mbed714 | 0:331db0b44b67 | 372 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 373 | |
mbed714 | 0:331db0b44b67 | 374 | #endif // scmRTOS_DEFS_H |