source: HelloMruby/tags/HelloMruby-V1.0.0/MyMrubyVM.cdl

Last change on this file was 81, checked in by okuma-top, 8 years ago

change VM composite name

File size: 1.1 KB
Line 
1import( <mruby.cdl> );
2
3// main 関数の引数の相違を調整するアダプター セルタイプ
4// sTaskBody:void main(void) => POSIX:main( argc, argv )
5celltype tTaskMain2PosixMain{
6 entry sTaskBody eMain;
7 call nPosix::sMain cMain;
8 attr {
9 int argc;
10 [size_is(argc)]
11 char **argv;
12 };
13};
14
15[active]
16composite tPosixMrubyVmInTask {
17 [optional]
18 call nMruby::sInitializeBridge cInit;
19 attr {
20 int argc;
21 [size_is(argc)]
22 char **argv;
23
24 /*
25 * TA_NULL 0x00U デフォルト値
26 * TA_ACT 0x01U タスクの生成時にタスクを起動する
27 */
28 ATR taskAttribute = C_EXP("TA_NULL");
29 PRI priority;
30 SIZE stackSize;
31 char_t *name = C_EXP( "\"$id$\"" );
32 };
33
34 cell nMruby::tMrubyProc VM {
35 cInit => composite.cInit;
36 };
37
38 // main 関数の引数の相違を調整するアダプター セル
39 cell tTaskMain2PosixMain ConvMain{
40 cMain = VM.eMain;
41 argc = composite.argc;
42 argv = composite.argv;
43 };
44
45 /// VM 用タスク
46 cell tTask VMTask{
47 cBody = ConvMain.eMain;
48 priority = composite.priority;
49 stackSize = composite.stackSize;
50 taskAttribute = composite.taskAttribute;
51 name = composite.name;
52 };
53};
Note: See TracBrowser for help on using the repository browser.