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