Mercurial > hg > Members > kono > Cerium
annotate TaskManager/kernel/schedule/ListData.h @ 696:b5c3ef336878
on going...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 13 Dec 2009 10:49:07 +0900 |
parents | 8843edf37c0e |
children | 7e937a1cd121 |
rev | line source |
---|---|
109 | 1 #ifndef INCLUDED_LIST_DATA |
2 #define INCLUDED_LIST_DATA | |
3 | |
301
bcb81858aa62
remove deprecated source. not work.
tkaito@localhost.localdomain
parents:
109
diff
changeset
|
4 #include "base.h" |
605
90c61fe2b109
working on 32 bit compiler
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
603
diff
changeset
|
5 #include "types.h" |
109 | 6 |
7 #define MAX_LIST_DMA_SIZE 8 | |
8 | |
9 class ListElement { | |
10 public: | |
11 BASE_NEW_DELETE(ListElement); | |
12 | |
13 int size; | |
629
8843edf37c0e
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
605
diff
changeset
|
14 #ifdef __CERIUM_CELL__ |
8843edf37c0e
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
605
diff
changeset
|
15 uint32 addr; // Cell の仕様なんでどうしようもない... |
8843edf37c0e
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
605
diff
changeset
|
16 // PowerPC 64bit だと動かない可能性も高いんだが... |
8843edf37c0e
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
605
diff
changeset
|
17 #else |
603
42c94f85c779
long -> memaddr (64 or 32)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
602
diff
changeset
|
18 memaddr addr; |
629
8843edf37c0e
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
605
diff
changeset
|
19 #endif |
109 | 20 }; |
21 | |
22 typedef ListElement* ListElementPtr; | |
23 | |
24 class ListData { | |
25 public: | |
26 BASE_NEW_DELETE(ListData); | |
27 | |
28 int length; // The number of data (4) | |
29 int size; // Total size of data (4) | |
696 | 30 #ifdef SIMPLE_TASK |
31 int *bound; | |
32 ListElement *element; | |
33 #else | |
109 | 34 int a[2]; // for alignment |
35 int bound[MAX_LIST_DMA_SIZE]; // (4 * MAX_LIST_DMA_SIZE) | |
36 ListElement element[MAX_LIST_DMA_SIZE]; // (8 * MAX_LIST_DMA_SIZE) | |
696 | 37 #endif |
109 | 38 |
39 void clear(void) { | |
40 length = 0; | |
41 size = 0; | |
42 } | |
43 }; | |
44 | |
45 typedef ListData* ListDataPtr; | |
46 | |
47 #endif |