Mercurial > hg > Game > Cerium
annotate TaskManager/kernel/ppe/TaskLog.h @ 1468:840dee241530 draft
merge
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 15 Jul 2012 17:42:10 +0900 |
parents | fc5b23108608 9b0908cb7553 |
children | 4443d59a8210 |
rev | line source |
---|---|
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 #ifndef INCLUDED_TASKLOG |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 #define INCLUDED_TASKLOG |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 |
1424
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
4 #include "QueueInfo.h" |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 struct waitTask { |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 int task_id; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 int cmd; |
1424
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
9 |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
10 waitTask *next; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
11 waitTask *prev; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
12 waitTask *waiter; |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 }; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 |
1465 | 15 static int task_id; |
16 | |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 class TaskLog { |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 public: |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 /* variables */ |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 int mtask_id; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 int cmd; |
1424
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
23 QueueInfo<waitTask> wait_for_list; |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 unsigned long long create_time; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 unsigned long long execute_time; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 unsigned long long finish_time; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
27 |
1424
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
28 TaskLog *next; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
29 TaskLog *prev; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
30 TaskLog *waiter; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
31 |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 /* constructor */ |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33 TaskLog() { |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34 mtask_id = task_id; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
35 task_id++; |
1431
9b0908cb7553
change to exporting filetype
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1428
diff
changeset
|
36 create_time = 0; |
9b0908cb7553
change to exporting filetype
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1428
diff
changeset
|
37 execute_time = 0; |
9b0908cb7553
change to exporting filetype
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1428
diff
changeset
|
38 finish_time = 0; |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
39 } |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
40 |
1428
af2adce9752e
add to export TaskLog
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1424
diff
changeset
|
41 void set_cmd(int _cmd) { |
af2adce9752e
add to export TaskLog
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1424
diff
changeset
|
42 cmd = _cmd; |
af2adce9752e
add to export TaskLog
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1424
diff
changeset
|
43 } |
af2adce9752e
add to export TaskLog
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1424
diff
changeset
|
44 |
af2adce9752e
add to export TaskLog
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1424
diff
changeset
|
45 |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
46 private: |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
47 // Unique id |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
48 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
49 }; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
50 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
51 #endif |