Forums: Help (Thread #5831)

CRE_FLGについて (2004-08-24 15:36 by Anonymous #10725)

また初歩的な質問ですみません。
静的生成でIDを連続した番号でなく飛び飛びな番号で生成可能でしょうか?

連続しない番号の場合、セマフォオブジェクトがアロケートされていないエリアまで初期化されているような気がします。動的生成の場合もHOS_MAX_FLGIDで指定した範囲を初期化してしまうようです。


Reply to #10725×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: CRE_FLGについて (2004-08-24 15:43 by Anonymous #10726)

すみません、セマフォでなくてフラグの場合です。
Reply to #10725

Reply to #10726×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: CRE_FLGについて (2004-08-24 16:04 by hamayan #10727)

試しに
HOS_MAX_FLGID(16);

CRE_FLG(FID_RTLINT, {TA_TFIFO | TA_WSGL , 0});
CRE_FLG(FID_RTLINTSND, {TA_TFIFO | TA_WSGL , 0});
CRE_FLG(FID_RTLINTOVW, {TA_TFIFO | TA_WSGL , 0});
CRE_FLG(10, {TA_TFIFO | TA_WSGL , 0});
CRE_FLG(12, {TA_TFIFO | TA_WSGL , 0});
CRE_FLG(14, {TA_TFIFO | TA_WSGL , 0});
CRE_FLG(16, {TA_TFIFO | TA_WSGL , 0});

と書いて、コンフィギュレータ-に掛けたら、
/* ------------------------------------------ */
/* create event flag objects */
/* ------------------------------------------ */

/* event flag control block for rom area */
const T_KERNEL_FLGCB_ROM kernel_flgcb_rom[7] =
{
{(ATR)(TA_TFIFO | TA_WSGL), (FLGPTN)(0)},
{(ATR)(TA_TFIFO | TA_WSGL), (FLGPTN)(0)},
{(ATR)(TA_TFIFO | TA_WSGL), (FLGPTN)(0)},
{(ATR)(TA_TFIFO | TA_WSGL), (FLGPTN)(0)},
{(ATR)(TA_TFIFO | TA_WSGL), (FLGPTN)(0)},
{(ATR)(TA_TFIFO | TA_WSGL), (FLGPTN)(0)},
{(ATR)(TA_TFIFO | TA_WSGL), (FLGPTN)(0)},
};

/* event flag control block for ram area */
T_KERNEL_FLGCB_RAM kernel_flgcb_ram[7];

/* event flag control block table */
T_KERNEL_FLGCB_RAM *kernel_flgcb_ram_tbl[16] =
{
&kernel_flgcb_ram[0],
&kernel_flgcb_ram[1],
&kernel_flgcb_ram[2],
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
&kernel_flgcb_ram[3],
NULL,
&kernel_flgcb_ram[4],
NULL,
&kernel_flgcb_ram[5],
NULL,
&kernel_flgcb_ram[6],
};

/* event flag control block count */
const INT kernel_flgcb_cnt = 16;

と生成してきたのですが、そう言う事ではなくて?。

しかし、実際にIDを飛び飛びに設定して、正しく動くかどうかまでは確認していません。
誰かやった人、居ます?。
Reply to #10726

Reply to #10727×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: CRE_FLGについて NULLの部分が? (2004-08-24 17:11 by Anonymous #10730)

すみません、回答ありがとうございます。
ソースのkernel_ini_flgを見るとNULLをチェックしていないので、単純にIDの最初から順番に初期化されるのではないでしょうか?
Reply to #10725

Reply to #10730×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: CRE_FLGについて NULLの部分が? (2004-08-24 17:32 by hamayan #10731)

確かに、他のセマとかタスクの場合はNULLのチェックが入っていますね。
KERNEL_FLGID_TO_FLGCB_RAM(i)->flgptn = KERNEL_FLGID_TO_FLGCB_RAM(i)->flgcb_rom->iflgptn;
なので、コンフィギュレータでNULLに初期化されている領域の代入を行った場合、特に0番地がROMでは無いシステムの場合は、問題が有るかも。

セマのコードをぱくって、
if ( KERNEL_FLGID_TO_FLGCB_RAM(i) != NULL )
KERNEL_FLGID_TO_FLGCB_RAM(i)->flgptn = KERNEL_FLGID_TO_FLGCB_RAM(i)->flgcb_rom->iflgptn;

となるのでしょうか?。
そろそろm-araiさんの登場の予感。
Reply to #10730

Reply to #10731×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: CRE_FLGについて NULLの部分が? (2004-08-24 20:19 by m-arai #10733)

Reply to #10733×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: CRE_FLGについて NULLの部分が? (2004-08-24 21:19 by hamayan #10734)

素早い対応、有難うございます。(’-’*)
Reply to #10733

Reply to #10734×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: CRE_FLGについて ありがとうございます。 (2004-08-24 23:10 by Anonymous #10736)

すみません、HOSの恩恵を受ける身で質問ばかりで、いろいろと対応していだだきまして、ありがとうございます。
Reply to #10725

Reply to #10736×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: CRE_FLGについて ありがとうございます。 (2004-08-24 23:29 by m-arai #10737)

いえいえ、こうして問題点を適切に指摘するバグ報告を
していただけたからには、既に一方的な受益者では
ありません。
お蔭様でまた一つバグが減りました。今後ともよろしく
お願いします。
Reply to #10736

Reply to #10737×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login