Mercurial > hg > Members > kono > Cerium
annotate TaskManager/kernel/schedule/ListData.h @ 1044:150412ed980a
minor fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Dec 2010 00:05:31 +0900 |
parents | 31d0a5baafdf |
children |
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 int *bound; |
31 ListElement *element; | |
109 | 32 |
33 void clear(void) { | |
34 length = 0; | |
35 size = 0; | |
36 } | |
699 | 37 |
736 | 38 /* |
39 void print(Scheduler *s) { | |
40 s->printf("inList length %d size %d\n",length, size); | |
699 | 41 for(int i=0;i<length;i++) { |
736 | 42 s->printf("inList element[%d] size %d addr %lx\n",i, element[i].size, (unsigned long)element[i].addr); |
699 | 43 } |
44 } | |
736 | 45 */ |
109 | 46 }; |
47 | |
48 typedef ListData* ListDataPtr; | |
49 | |
50 #endif |