Mercurial > hg > Members > kono > Cerium
comparison TaskManager/kernel/ppe/HTask.h @ 941:0c11c2fd7e63
add no_auto_free flag on HTask
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 31 Jul 2010 17:50:38 +0900 |
parents | bed529c55eda |
children | a9c7784e5dae |
comparison
equal
deleted
inserted
replaced
940:0d404f6c36a8 | 941:0c11c2fd7e63 |
---|---|
38 TaskManagerImpl *mimpl; | 38 TaskManagerImpl *mimpl; |
39 | 39 |
40 HTask *waiter; | 40 HTask *waiter; |
41 HTask *next; | 41 HTask *next; |
42 HTask *prev; | 42 HTask *prev; |
43 | |
44 struct { | |
45 unsigned no_auto_free:1; // bit 0 auto free flag (0 .. auto, 1 manual) | |
46 } flag; | |
43 | 47 |
44 void spawn(); | 48 void spawn(); |
45 void wait_for(HTask *); | 49 void wait_for(HTask *); |
46 void set_cpu(CPU_TYPE type); | 50 void set_cpu(CPU_TYPE type); |
47 void set_post(PostFunction func, void *read, void *write); | 51 void set_post(PostFunction func, void *read, void *write); |
89 void set_param_t(int index, memaddr param) { | 93 void set_param_t(int index, memaddr param) { |
90 Task *t = (Task*)rbuf; | 94 Task *t = (Task*)rbuf; |
91 t->set_param_t(index, param); | 95 t->set_param_t(index, param); |
92 } | 96 } |
93 | 97 |
98 void no_auto_free() { | |
99 flag.no_auto_free = 1; | |
100 } | |
101 | |
94 void init(int cmd) { | 102 void init(int cmd) { |
95 next = prev = NULL; | 103 next = prev = NULL; |
96 waiter = NULL; | 104 waiter = NULL; |
97 | 105 |
98 command = cmd; | 106 command = cmd; |
99 param_index = 0; | 107 param_index = 0; |
100 in_index = 0; | 108 in_index = 0; |
101 out_index = 0; | 109 out_index = 0; |
110 flag.no_auto_free = 0; | |
102 self = (memaddr) this; | 111 self = (memaddr) this; |
103 | 112 |
104 post_func = NULL; | 113 post_func = NULL; |
105 mimpl = NULL; | 114 mimpl = NULL; |
106 cpu_type = CPU_PPE; | 115 cpu_type = CPU_PPE; |