Changeset 429 for EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_impl.h
- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_impl.h
r321 r429 6 6 * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory 7 7 * Toyohashi Univ. of Technology, JAPAN 8 * Copyright (C) 2004-201 6by Embedded and Real-Time Systems Laboratory8 * Copyright (C) 2004-2018 by Embedded and Real-Time Systems Laboratory 9 9 * Graduate School of Information Science, Nagoya Univ., JAPAN 10 10 * … … 71 71 72 72 /* 73 * 型キャストを行うマクロの定義74 */ 75 #if ndef CAST76 # define CAST(type, val) ((type)(val))77 #endif /* CAST*/73 * トレースログに関する設定 74 */ 75 #ifdef TOPPERS_ENABLE_TRACE 76 #include "arch/tracelog/trace_log.h" 77 #endif /* TOPPERS_ENABLE_TRACE */ 78 78 79 79 /* … … 157 157 #endif /* TARGET_ISRATR */ 158 158 159 #ifndef TARGET_MIN_STKSZ /* タスクのスタックサイズの最小値 */ 160 #define TARGET_MIN_STKSZ 1U /* 未定義の場合は0でないことをチェック */ 161 #endif /* TARGET_MIN_STKSZ */ 162 159 163 /* 160 164 * ヘッダファイルを持たないモジュールの関数・変数の宣言 … … 173 177 174 178 /* 175 * 初期化ルーチンの実行(kernel_cfg.c) 176 */ 177 extern void call_inirtn(void); 178 179 /* 180 * 終了処理ルーチンの実行(kernel_cfg.c) 181 */ 182 extern void call_terrtn(void); 179 * 初期化ルーチン関係の定義(kernel_cfg.c) 180 */ 181 typedef struct initialization_routine_block { 182 INIRTN inirtn; /* 初期化ルーチンの先頭番地 */ 183 intptr_t exinf; /* 初期化ルーチンの拡張情報 */ 184 } INIRTNB; 185 186 extern const uint_t tnum_inirtn; /* 初期化ルーチンの数 */ 187 188 extern const INIRTNB inirtnb_table[]; /* 初期化ルーチンブロックテーブル */ 189 190 /* 191 * 終了処理ルーチン関係の定義(kernel_cfg.c) 192 */ 193 typedef struct termination_routine_block { 194 TERRTN terrtn; /* 終了処理ルーチンの先頭番地 */ 195 intptr_t exinf; /* 終了処理ルーチンの拡張情報 */ 196 } TERRTNB; 197 198 extern const uint_t tnum_terrtn; /* 終了処理ルーチンの数 */ 199 200 extern const TERRTNB terrtnb_table[]; /* 終了処理ルーチンブロックテーブル */ 183 201 184 202 /* … … 192 210 193 211 /* 194 * カーネル が割り付けるメモリ領域(kernel_cfg.c)195 */ 196 extern const size_t kmmsz; /* カーネルが割り付けるメモリ領域のサイズ */197 extern MB_T *const kmm; /* カーネルが割り付けるメモリ領域の先頭番地 */212 * カーネルメモリプール領域(kernel_cfg.c) 213 */ 214 extern const size_t mpksz; /* カーネルメモリプール領域のサイズ */ 215 extern MB_T *const mpk; /* カーネルメモリプール領域の先頭番地 */ 198 216 199 217 /* … … 203 221 204 222 /* 223 * カーネルメモリプール領域有効フラグ(startup.c) 224 */ 225 extern bool_t mpk_valid; 226 227 /* 205 228 * カーネルの起動(startup.c) 206 229 */ … … 213 236 214 237 /* 215 * カーネルの割り付けるメモリ領域の管理(startup.c) 216 */ 217 extern void initialize_kmm(void); 218 extern void *kernel_malloc(size_t size); 219 extern void kernel_free(void *ptr); 238 * メモリプール領域の管理(startup.c) 239 */ 240 extern bool_t initialize_mempool(MB_T *mempool, size_t size); 241 extern void *malloc_mempool(MB_T *mempool, size_t size); 242 extern void free_mempool(MB_T *mempool, void *ptr); 243 244 /* 245 * カーネルメモリプール領域からのメモリ獲得/解放 246 */ 247 Inline void * 248 malloc_mpk(size_t size) 249 { 250 if (mpk_valid) { 251 return(malloc_mempool(mpk, size)); 252 } 253 else { 254 return(NULL); 255 } 256 } 257 258 Inline void 259 free_mpk(void *ptr) 260 { 261 if (mpk_valid) { 262 free_mempool(mpk, ptr); 263 } 264 } 220 265 221 266 /* … … 225 270 226 271 /* 227 * 通知方法のエラーチェック 272 * 通知方法のエラーチェック(time_manage.c) 228 273 */ 229 274 extern ER check_nfyinfo(const T_NFYINFO *p_nfyinfo); 230 275 231 276 /* 232 * 通知ハンドラ 277 * 通知ハンドラ(time_manage.c) 233 278 */ 234 279 extern void notify_handler(intptr_t exinf);
Note:
See TracChangeset
for help on using the changeset viewer.