# HG changeset patch # User Shinji KONO # Date 1260945114 -32400 # Node ID c42cab5ad4c3add7412e02e7085996bbc304a3c6 # Parent f725c6455d19fdb5c18ef3a1e16b08e9567b9bd6 HTask fix diff -r f725c6455d19 -r c42cab5ad4c3 TaskManager/kernel/ppe/HTask.h --- a/TaskManager/kernel/ppe/HTask.h Wed Dec 16 15:27:46 2009 +0900 +++ b/TaskManager/kernel/ppe/HTask.h Wed Dec 16 15:31:54 2009 +0900 @@ -48,6 +48,7 @@ Task *next_task_array(int task_id, Task *t); void spawn_task_array(Task *t); + private: int param_index; @@ -81,6 +82,20 @@ t->set_param_t(index, param); } + void init(int cmd) { + next = prev = NULL; + waiter = NULL; + + command = cmd; + param_index = 0; + in_index = 0; + out_index = 0; + self = (memaddr) this; + + post_func = NULL; + mimpl = NULL; + cpu_type = CPU_PPE; + } #define add_param(param) add_param_t((memaddr)(param)) #define set_param(index,param) set_param_t(index, (memaddr) (param)) diff -r f725c6455d19 -r c42cab5ad4c3 TaskManager/kernel/ppe/HTaskInfo.cc --- a/TaskManager/kernel/ppe/HTaskInfo.cc Wed Dec 16 15:27:46 2009 +0900 +++ b/TaskManager/kernel/ppe/HTaskInfo.cc Wed Dec 16 15:31:54 2009 +0900 @@ -60,22 +60,7 @@ taskQueuePool.extend_pool(64); q = taskQueuePool.poll(); } - q->next = q->prev = NULL; - q->waiter = NULL; - - q->command = cmd; - q->param_index = 0; - q->in_index = 0; - q->out_index = 0; - q->self = (memaddr) q; - - q->post_func = NULL; - q->mimpl = NULL; - q->cpu_type = CPU_PPE; - - // q->wait_me.clear(); - // q->wait_i.clear(); - + q->init(cmd); return q; }