annotate TaskManager.h @ 1:aef83aed7a07

scheduler test success.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Sun, 20 Dec 2009 20:46:53 +0900
parents 5b089096921f
children 803d6bf22e6d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #ifndef _TASKMANAGER_H
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #define _TASKMANAGER_H
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include <stdlib.h>
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include "List.h"
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 typedef List TaskList;
1
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
7 typedef uint32_t TaskTypeID;
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 /* C++CeriumでのTaskObjectにあたる */
1
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
10 typedef struct _tasktype {
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
11 //Taskrun run;
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 char *name;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 enum cpu cputype;
1
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
14 } TaskType;
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
1
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
16 /* C++CeriumでのHTaskにあたるのかな */
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 typedef struct _Task {
1
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
18 TaskType tasktype;
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 unsigned int id; // is it needed?
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 void *rbuff;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 void *wbuff;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 size_t rsize;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 size_t wsize;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 TaskList waiter; // List of tasks waiting for me :-P
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 TaskList waitee; // List of tasks keep me waiting :-(
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 } Task;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
1
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
30 /* defined in USERs space. */
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
31 /* but generated by Cerium automatically. */
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
32 extern int max_tasktypes;
aef83aed7a07 scheduler test success.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
33 extern TaskType taskTypes[];
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 #endif /* !_TASKMANAGER_H */