annotate src/allocate/allocateContext.h @ 113:d05b9937aa95

Change element data from Task to Data
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Tue, 07 Jun 2016 18:43:21 +0900
parents 1eb599acffe4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
1 /* Context definition for allocate example */
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
2
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
3 enum Code {
15
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
4 Code1,
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
5 Code2,
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
6 Code3,
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
7 Allocate,
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
8 Exit,
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
9 };
14
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
10
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
11 struct Context {
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
12 int codeSize;
15
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
13 __code (**code) (struct Context *);
17
1eb599acffe4 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
14 void* heap;
14
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
15 int dataSize;
15
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
16 union Data **data;
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
17 };
14
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
18
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
19 union Data {
15
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
20 char data[8];
14
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
21 long count;
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
22 struct Allocate {
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
23 long size;
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
24 enum Code next;
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
25 } allocate;
15
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
26 };