Mercurial > hg > Members > kono > Cerium
changeset 714:c42cab5ad4c3
HTask fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 16 Dec 2009 15:31:54 +0900 |
parents | f725c6455d19 |
children | 974672c4ea2a |
files | TaskManager/kernel/ppe/HTask.h TaskManager/kernel/ppe/HTaskInfo.cc |
diffstat | 2 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- 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))
--- 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; }