annotate src/parallel_execution/allocate.c @ 269:5170539348ec

rename TaskManagerImpl.cbc
author mir3636
date Sun, 29 Jan 2017 22:15:32 +0900
parents c34e6aa10967
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
86
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include "context.h"
136
a747dc9d4da6 stack refactering no compile error
mir3636
parents: 131
diff changeset
2 #include "origin_cs.h"
86
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
130
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
4 union Data* allocator(struct Context* context) {
86
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 context->data[++context->dataNum] = context->heap;
217
c34e6aa10967 Fix DataGear access name
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 148
diff changeset
6 context->heap += context->data[D_Allocate]->Allocate.size;
130
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
7 return context->data[context->dataNum];
86
e06e1a9e569e create worker
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 }
130
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
9
131
a4507906938c Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 130
diff changeset
10 __code allocatorCS(struct Context* context, struct Allocate* allocate) {
130
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
11 context->data[++context->dataNum] = context->heap;
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
12 context->heap += allocate->size;
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
13 goto meta(context, allocate->next);
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
14 }
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
15
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
16 __code allocator_stub(struct Context* context) {
217
c34e6aa10967 Fix DataGear access name
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 148
diff changeset
17 goto allocatorCS(context, &context->data[D_Allocate]->Allocate);
130
2bb5e4f0fd35 Stackinterface
ikkun
parents: 87
diff changeset
18 }