annotate src/allocate/allocateContext.c @ 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 ec4e7a81bddf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
1 #include "allocateContext.h"
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
2 extern __code code1(struct Context*);
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
3 extern __code code2(struct Context*);
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
4 extern __code code3(struct Context*);
15
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
5 extern __code meta(struct Context*);
14
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
6 extern __code allocate(struct Context*);
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
7 extern __code exit_code(struct Context*);
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
8
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
9 __code initAllocateContext(struct Context* context) {
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
10 context->codeSize = 3;
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
11 context->code[Code1] = code1;
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
12 context->code[Code2] = code2;
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
13 context->code[Code3] = code3;
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
14 context->code[Allocate] = allocate;
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
15 context->code[Exit] = exit_code;
17
1eb599acffe4 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
16
15
907c69e21e56 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
17 context->dataSize = 0;
17
1eb599acffe4 modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
18 context->data[context->dataSize] = context->heap;
18
ec4e7a81bddf modify allocate
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
19 context->heap += sizeof(struct Allocate);
14
d98961bfd0f2 Code linkage information
innparusu
parents:
diff changeset
20 }