Mercurial > hg > Game > Cerium
annotate TaskManager/Fifo/MainScheduler.cc @ 1553:21ddbc06dcde draft
fix GpuScheduler
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 17 Feb 2013 19:42:36 +0900 |
parents | 5b024efa2429 |
children |
rev | line source |
---|---|
109 | 1 #include <stdlib.h> |
2 #include <string.h> | |
3 #include "MainScheduler.h" | |
800
54f0180cea0f
run16 word count ( not yet worked. )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
647
diff
changeset
|
4 #include "TaskManagerImpl.h" |
1229
424c1f16e704
add args useRefDma
Daichi TOMA <e085740@ie.u-ryukyu.ac.jp>
parents:
1219
diff
changeset
|
5 #include "FifoDmaManager.h" |
1219
a27c361c436b
add ReferencedDmaManager.cc
Daichi TOMA <e085740@ie.u-ryukyu.ac.jp>
parents:
800
diff
changeset
|
6 #include "ReferencedDmaManager.h" |
1288
b194cb2d44bb
add choose function
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1229
diff
changeset
|
7 #include "PreRefDmaManager.h" |
109 | 8 #include "error.h" |
9 | |
10 void | |
1229
424c1f16e704
add args useRefDma
Daichi TOMA <e085740@ie.u-ryukyu.ac.jp>
parents:
1219
diff
changeset
|
11 MainScheduler::init_impl(int useRefDma) |
109 | 12 { |
1413
5b024efa2429
fix free on non copy DMA
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1288
diff
changeset
|
13 if (useRefDma & 0x10) { |
5b024efa2429
fix free on non copy DMA
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1288
diff
changeset
|
14 fifoDmaManager = new PreRefDmaManager(); |
5b024efa2429
fix free on non copy DMA
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1288
diff
changeset
|
15 } else if (useRefDma & 0x01) { |
5b024efa2429
fix free on non copy DMA
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1288
diff
changeset
|
16 fifoDmaManager = new FifoDmaManager(); |
5b024efa2429
fix free on non copy DMA
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1288
diff
changeset
|
17 } else { |
5b024efa2429
fix free on non copy DMA
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1288
diff
changeset
|
18 fifoDmaManager = new ReferencedDmaManager(); |
5b024efa2429
fix free on non copy DMA
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
1288
diff
changeset
|
19 } |
647
7ba4ad4538b1
MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
645
diff
changeset
|
20 connector = fifoDmaManager; |
109 | 21 } |
22 | |
23 /** | |
321 | 24 * メインメモリ領域を allocate する。 |
25 * Fifo バージョンだから、まあ普通に malloc でおk | |
109 | 26 */ |
27 void | |
28 MainScheduler::mainMem_alloc(int id, int size) | |
29 { | |
800
54f0180cea0f
run16 word count ( not yet worked. )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
647
diff
changeset
|
30 mainMemList[id] = (memaddr)manager->allocate(size); |
109 | 31 } |
32 | |
640
ecf056ddd21a
SimpeTask on Cell worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
635
diff
changeset
|
33 /* end */ |