annotate include/TaskManager/HTask.h @ 307:3fc86ddf5d1c draft

clean up include
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 08 Jun 2009 19:32:38 +0900
parents da8edd0735f2
children 5b995810b86a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #ifndef INCLUDED_HTASK
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #define INCLUDED_HTASK
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3
307
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
4 #include "base.h"
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
5 #include "types.h"
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
6 #include "Task.h"
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 293
diff changeset
7 #include "TaskQueueInfo.h"
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9 class TaskManagerImpl;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10
293
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
11 /*!
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
12 @class
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
13
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
14 @brief
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
15
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
16 Cerium の Task で、spawn() でキューに格納されて順次実行される。
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
17 cpu の指定があれば並列に実行される。
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
18 特定の Task を待ち合わせる事が可能。
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
19 Task の入出力は dma などで copy される。
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
20 */
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
21
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 class HTask : public Task {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23 public:
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 BASE_NEW_DELETE(HTask);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
26 TaskQueuePtr wait_me; // List of task waiting for me
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
27 TaskQueuePtr wait_i; // List of task for which I am waiting
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
28 void (*post_func)(void *);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
29 void *post_arg;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
30 CPU_TYPE cpu_type;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
31 HTask *next;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
32 TaskManagerImpl *mimpl;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
33
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34 void spawn(void);
293
da8edd0735f2 add wait_for document
e065746@localhost.localdomain
parents: 109
diff changeset
35 void wait_for(HTask *);
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36 void set_cpu(CPU_TYPE type);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
37 void set_post(void (*func)(void *), void *arg);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38 };
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40 typedef HTask* HTaskPtr;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42 #endif