構造体 toppers::itron::jsp::task_policyタスクのためのポリシークラス
[詳細]
#include "toppers/itron/jsp/task.hpp"
toppers::itron::jsp::task_policyに対する継承グラフ
[凡例]toppers::itron::jsp::task_policyのコラボレーション図
[凡例]すべてのメンバ一覧
|
Static Public メソッド |
static void | generate_constants (const kernel_cfg &cfg, std::ostream &ostr) |
| torder_table の生成
|
static void | generate_assertions (const kernel_cfg &cfg, std::ostream &ostr) |
| パラメータチェックコード の生成
|
static void | generate_extra_empty_labels (std::ostream &ostr) |
| タスクがない場合の __EMPTY_LABEL の生成
|
static bool | verify (const static_api &api, kernel_object &obj) |
| specified_object<Plociy> クラスが要求する Policy::verify 関数
|
static bool | check (const itron::kernel_chk &chk, const s_record &srec, const nm_symbol &syms) |
| リンク後のパラメータチェック
|
Static Public 変数 |
static const char | name_ [] = "task" |
static const char | symbol_ [] = "tsk" |
static const char *const | apis_ [] = { "CRE_TSK", 0 } |
static const char *const | params_ [] = { "$tskid { #tskatr exinf task itskpri stksz stk }", 0 } |
static const char *const | apis2_ [] = { "DEF_TEX", 0 } |
static const char *const | params2_ [] = { "%tskid { #texatr texrtn }", 0 } |
static const char *const | prefix_ = "t" |
static const char | region_format_ [] = "static __STK_UNIT __stack_@name[__TCOUNT_STK_UNIT(@stksz)];\n" |
static const char | init_format_ [] = "\t{ @#tskatr, (VP_INT)(@exinf), (FP)(@task), INT_PRIORITY(@itskpri), __TROUND_STK_UNIT(@stksz), __stack_@name, @#texatr, (FP)(@texrtn) }" |
説明
タスクのためのポリシークラス
このクラスで実現される静的API
task.hpp の 82 行で定義されています。
関数
|
リンク後のパラメータチェック
- 引数:
-
| chk | チェック情報 |
| srec | ロードモジュールのダンプ情報 |
| syms | シンボルテーブル |
toppers::itron::kernel_object_policy_baseを再定義しています。
task.cpp の 140 行で定義されています。
参照先 toppers::nm_symbol::entry::address・toppers::nm_symbol::find()・toppers::itron::kernel_chk::get()・toppers::nm_symbol::entry::type. 00141 {
00142 nm_symbol::entry entry = syms.find( "_kernel_tinib_table" );
00143 if ( entry.type < 0 )
00144 {
00145 return false;
00146 }
00147 long tnum_tskid = chk.get( kernel_chk::countof_TSKID );
00148 long sizeof_FP = chk.get( kernel_chk::sizeof_FP );
00149 long sizeof_TINIB = chk.get( kernel_chk::sizeof_TINIB );
00150 long offsetof_TINIB_task = chk.get( kernel_chk::offsetof_TINIB_task );
00151
00152 for ( int i = 0; i < tnum_tskid; i++ )
00153 {
00154 unsigned long value = 0;
00155 for ( int j = 0; j < sizeof_FP; j++ )
00156 {
00157 int t = srec[entry.address + sizeof_TINIB*i + offsetof_TINIB_task + j];
00158 if ( t < 0 )
00159 {
00160 return false;
00161 }
00162 value = ( value << 8 ) | ( t & 0xff );
00163 }
00164 if ( value == 0 )
00165 {
00166 error( _( "start address of task %1% is null" ) % ( i + 1 ) );
00167 }
00168 }
00169 return true;
00170 }
関数の呼び出しグラフ:
|
void toppers::itron::jsp::task_policy::generate_assertions |
( |
const kernel_cfg & |
cfg, |
|
|
std::ostream & |
ostr |
|
) |
[static] |
|
|
パラメータチェックコード の生成
- 引数:
-
| cfg | kernel_cfg.c 生成情報 |
| ostr | 出力ストリーム |
toppers::itron::kernel_object_policy_baseを再定義しています。
task.cpp の 82 行で定義されています。
参照先 toppers::kernel_cfg::get_inib_array()・name_. 00083 {
00084 const kernel_cfg::inib_array* pinibs = cfg.get_inib_array( name_ );
00085 static const char pattern[] =
00086 "#if ((@#tskatr) & (TA_HLNG|TA_ASM)) != TA_HLNG\n"
00087 "#error \"`tskatr\' of task `@name\' is not TA_HLNG\"\n"
00088 "#endif\n"
00089 "__CFG_ASSERT(((@#tskatr) & (TA_HLNG|TA_ASM)) == TA_HLNG);\n"
00090 "__CFG_ASSERT(TMIN_TPRI <= (@itskpri) && (@itskpri) <= TMAX_TPRI);\n"
00091 "__CFG_ASSERT((@stksz) > 0);\n"
00092 "\n"
00093 "#if ((@#texatr) & (TA_HLNG|TA_ASM)) != TA_HLNG\n"
00094 "#error \"`texatr\' of task `@name\' is not TA_HLNG\"\n"
00095 "#endif\n"
00096 "__CFG_ASSERT(((@#texatr) & (TA_HLNG|TA_ASM)) == TA_HLNG);\n"
00097 "\n";
00098 std::transform( pinibs->begin(), pinibs->end(), std::ostream_iterator<std::string>( ostr ), generator( pattern ) );
00099 }
関数の呼び出しグラフ:
|
void toppers::itron::jsp::task_policy::generate_constants |
( |
const kernel_cfg & |
cfg, |
|
|
std::ostream & |
ostr |
|
) |
[static] |
|
void toppers::itron::jsp::task_policy::generate_extra_empty_labels |
( |
std::ostream & |
ostr |
) |
[static] |
|
|
specified_object<Plociy> クラスが要求する Policy::verify 関数
- 引数:
-
| api | 解析対象の静的API情報 |
| obj | カーネルオブジェクト情報 |
- 戻り値:
- 判定結果が正常であれば true を返す。
toppers::itron::kernel_object_policy_baseを再定義しています。
task.cpp の 116 行で定義されています。
参照先 _・toppers::error()・toppers::itron::kernel_object::get(). 00117 {
00118 if ( obj.get( "stk" ) != "NULL" )
00119 {
00120 error( _( "parameter `%1%\' must be `NULL\'" ) % "stk" );
00121 return false;
00122 }
00123 if ( obj.get( "#texatr" ).empty() )
00124 {
00125 obj.set( "#texatr", "0" );
00126 }
00127 if ( obj.get( "texrtn" ).empty() )
00128 {
00129 obj.set( "texrtn", "0" );
00130 }
00131 return true;
00132 }
関数の呼び出しグラフ:
|
この構造体の説明は次のファイルから生成されました:
Copyright © 2006 by TAKAGI Nobuhisa.
このページは Wed Apr 12 16:32:08 2006 に Doxygen によって生成されました。
|
|