109
|
1 #ifndef INCLUDED_HTASK
|
|
2 #define INCLUDED_HTASK
|
|
3
|
|
4 #ifndef INCLUDED_BASE_H_
|
|
5 # include "base.h"
|
|
6 #endif
|
|
7
|
|
8 #ifndef INCLUDED_TYPES
|
|
9 # include "types.h"
|
|
10 #endif
|
|
11
|
|
12 #ifndef INCLUDED_TASK
|
|
13 # include "Task.h"
|
|
14 #endif
|
|
15
|
|
16 #ifndef INCLUDED_TASK_QUEUE_INFO
|
|
17 # include "TaskQueueInfo.h"
|
|
18 #endif
|
|
19
|
|
20 class TaskManagerImpl;
|
|
21
|
|
22 class HTask : public Task {
|
|
23 public:
|
|
24 BASE_NEW_DELETE(HTask);
|
|
25
|
|
26 TaskQueuePtr wait_me; // List of task waiting for me
|
|
27 TaskQueuePtr wait_i; // List of task for which I am waiting
|
|
28 void (*post_func)(void *);
|
|
29 void *post_arg;
|
|
30 CPU_TYPE cpu_type;
|
|
31 HTask *next;
|
|
32 TaskManagerImpl *mimpl;
|
|
33
|
|
34 void spawn(void);
|
|
35 void set_depend(HTask *);
|
|
36 void set_cpu(CPU_TYPE type);
|
|
37 void set_post(void (*func)(void *), void *arg);
|
|
38
|
|
39 #define wait_for set_depend
|
|
40 };
|
|
41
|
|
42 typedef HTask* HTaskPtr;
|
|
43
|
|
44 #endif
|