Mercurial > hg > Game > Cerium
annotate TaskManager/kernel/ppe/TaskLog.h @ 1424:0ce6c6880b4b draft
change to the queue form the list.
author | Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Mar 2012 16:36:20 +0900 |
parents | 515a0f15b5d2 |
children | af2adce9752e fc5b23108608 |
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 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 #include "HTask.h" |
1424
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
5 #include "QueueInfo.h" |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 struct waitTask { |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 int task_id; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 int cmd; |
1424
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
10 |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
11 waitTask *next; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
12 waitTask *prev; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
13 waitTask *waiter; |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 }; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 class TaskLog { |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 public: |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 /* variables */ |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 int mtask_id; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 int cmd; |
1424
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
22 QueueInfo<waitTask> wait_for_list; |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 unsigned long long create_time; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 unsigned long long execute_time; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 unsigned long long finish_time; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 |
1424
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
27 TaskLog *next; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
28 TaskLog *prev; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
29 TaskLog *waiter; |
0ce6c6880b4b
change to the queue form the list.
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
1423
diff
changeset
|
30 |
1423
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 /* constructor */ |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 TaskLog() { |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33 mtask_id = task_id; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34 task_id++; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
35 } |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
36 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
37 private: |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
38 // Unique id |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
39 static int task_id; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
40 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
41 }; |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
42 |
515a0f15b5d2
add to log taskdependency
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
43 #endif |