構造体 toppers::itron::jsp::exception_policyCPU例外のためのポリシークラス
[詳細]
#include "toppers/itron/jsp/exception.hpp"
toppers::itron::jsp::exception_policyに対する継承グラフ
[凡例]toppers::itron::jsp::exception_policyのコラボレーション図
[凡例]すべてのメンバ一覧
|
Public 型 |
enum | { use_id_ = 0
} |
| specified_object<Plociy> クラスが要求する Policy::use_id_ 定数 [詳細]
|
Static Public メソッド |
static void | generate_assertions (const kernel_cfg &cfg, std::ostream &ostr) |
| パラメータチェックコード の生成
|
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_ [] = "exception" |
static const char | symbol_ [] = "exc" |
static const char *const | apis_ [] = { "DEF_EXC", 0 } |
static const char *const | params_ [] = { "%excno { #excatr exchdr }" } |
static const char | region_format_ [] = "CFG_EXCHDR_ENTRY(@exchdr);\n" |
static const char | init_format_ [] = "\t{ @%excno, @#excatr, (FP)CFG_EXC_ENTRY(@exchdr) }" |
説明
CPU例外のためのポリシークラス
このクラスで実現される静的API
excno は kernel_object において、便宜的にID番号として扱われます。
exception.hpp の 80 行で定義されています。
列挙型
関数
|
リンク後のパラメータチェック
- 引数:
-
| chk | チェック情報 |
| srec | ロードモジュールのダンプ情報 |
| syms | シンボルテーブル |
toppers::itron::kernel_object_policy_baseを再定義しています。
exception.cpp の 99 行で定義されています。
参照先 toppers::nm_symbol::entry::address・toppers::nm_symbol::find()・toppers::itron::kernel_chk::get()・toppers::nm_symbol::entry::type. 00100 {
00101 nm_symbol::entry entry = syms.find( "_kernel_excinib_table" );
00102 if ( entry.type < 0 )
00103 {
00104 return false;
00105 }
00106 long tnum_cycid = chk.get( kernel_chk::countof_EXCNO );
00107 long sizeof_FP = chk.get( kernel_chk::sizeof_FP );
00108 long sizeof_EXCINIB = chk.get( kernel_chk::sizeof_EXCINIB );
00109 long offsetof_EXCINIB_cychdr = chk.get( kernel_chk::offsetof_EXCINIB_exchdr );
00110
00111 for ( int i = 0; i < tnum_cycid; i++ )
00112 {
00113 unsigned long value = 0;
00114 for ( int j = 0; j < sizeof_FP; j++ )
00115 {
00116 int t = srec[entry.address + sizeof_EXCINIB*i + offsetof_EXCINIB_cychdr + j];
00117 if ( t < 0 )
00118 {
00119 return false;
00120 }
00121 value = ( value << 8 ) | ( t & 0xff );
00122 }
00123 if ( value == 0 )
00124 {
00125 error( _( "start address of CPU exception #%1% handler is null" ) % ( i + 1 ) );
00126 }
00127 }
00128 return true;
00129 }
関数の呼び出しグラフ:
|
void toppers::itron::jsp::exception_policy::generate_assertions |
( |
const kernel_cfg & |
cfg, |
|
|
std::ostream & |
ostr |
|
) |
[static] |
|
|
パラメータチェックコード の生成
- 引数:
-
| cfg | kernel_cfg.c 生成情報 |
| ostr | 出力ストリーム |
toppers::itron::kernel_object_policy_baseを再定義しています。
exception.cpp の 59 行で定義されています。
参照先 toppers::kernel_cfg::get_inib_array()・name_. 00060 {
00061 const kernel_cfg::inib_array* pinibs = cfg.get_inib_array( name_ );
00062 static const char pattern[] =
00063 "#if (@#excatr) != 0x00u\n"
00064 "#error \"`excatr\' of CPU exception handler `@name\' is not 0\"\n"
00065 "#endif\n"
00066 "__CFG_ASSERT((@#excatr) == 0x00u);\n"
00067 "\n";
00068 std::transform( pinibs->begin(), pinibs->end(), std::ostream_iterator<std::string>( ostr ), generator( pattern ) );
00069 }
関数の呼び出しグラフ:
|
この構造体の説明は次のファイルから生成されました:
Copyright © 2006 by TAKAGI Nobuhisa.
このページは Wed Apr 12 16:32:07 2006 に Doxygen によって生成されました。
|
|