Mercurial > hg > Game > Cerium
annotate TaskManager/kernel/ppe/TaskList.h @ 1506:a7895ab4d0e3 draft
add flip flag and NDRange flag
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 10 Sep 2012 15:04:39 +0900 |
parents | cb57420a8219 |
children | 806b4658ced6 |
rev | line source |
---|---|
109 | 1 #ifndef INCLUDED_TASKLIST |
2 #define INCLUDED_TASKLIST | |
3 | |
301
7f991471d43f
remove deprecated source. not work.
tkaito@localhost.localdomain
parents:
244
diff
changeset
|
4 #include "base.h" |
7f991471d43f
remove deprecated source. not work.
tkaito@localhost.localdomain
parents:
244
diff
changeset
|
5 #include "Task.h" |
109 | 6 |
1462
8cf62aea798f
HTask/TaskList fix (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
958
diff
changeset
|
7 class HTask; |
109 | 8 |
895
b662e9dd26b0
add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
830
diff
changeset
|
9 #define TASK_MAX_SIZE 31 |
109 | 10 |
895
b662e9dd26b0
add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
830
diff
changeset
|
11 class TaskList { // 1024 byte |
109 | 12 public: |
13 BASE_NEW_DELETE(TaskList); | |
14 | |
1466 | 15 long lastTask; // 4 byte |
109 | 16 TaskList *next; // 4 byte |
806 | 17 TaskList *prev; // 4 byte |
18 TaskList *waiter; // 4 byte | |
1462
8cf62aea798f
HTask/TaskList fix (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
958
diff
changeset
|
19 HTask *self; // 4 byte |
8cf62aea798f
HTask/TaskList fix (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
958
diff
changeset
|
20 long dummy[3]; // 16 byte |
8cf62aea798f
HTask/TaskList fix (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
958
diff
changeset
|
21 Task tasks[TASK_MAX_SIZE]; // 32*TASK_MAX_SIZE |
1506
a7895ab4d0e3
add flip flag and NDRange flag
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents:
1466
diff
changeset
|
22 |
634 | 23 |
1466 | 24 TaskPtr last() { return (TaskPtr)(((memaddr)tasks)+lastTask); } |
25 void set_last(Task *t) { lastTask = ((memaddr)t) - ((memaddr)tasks); } | |
26 void init() { lastTask = ((memaddr)&tasks[TASK_MAX_SIZE])-(memaddr)(tasks); waiter=this; } | |
956
197b7e19a345
unified queue worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
899
diff
changeset
|
27 void initOnce() { } |
958 | 28 void freeOnce() {} |
29 | |
899 | 30 } ; |
109 | 31 |
32 typedef TaskList* TaskListPtr; | |
33 | |
34 #endif |