Mercurial > hg > Members > kono > Cerium
comparison TaskManager/kernel/ppe/HTask.h @ 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 | 5df90e02e34f |
comparison
equal
deleted
inserted
replaced
713:f725c6455d19 | 714:c42cab5ad4c3 |
---|---|
46 void set_post(PostFunction func, void *read, void *write); | 46 void set_post(PostFunction func, void *read, void *write); |
47 Task *create_task_array(int task_id, int num_task, int num_param, int num_inData, int num_outData); | 47 Task *create_task_array(int task_id, int num_task, int num_param, int num_inData, int num_outData); |
48 Task *next_task_array(int task_id, Task *t); | 48 Task *next_task_array(int task_id, Task *t); |
49 void spawn_task_array(Task *t); | 49 void spawn_task_array(Task *t); |
50 | 50 |
51 | |
51 private: | 52 private: |
52 | 53 |
53 int param_index; | 54 int param_index; |
54 int in_index; | 55 int in_index; |
55 int out_index; | 56 int out_index; |
79 void set_param_t(int index, memaddr param) { | 80 void set_param_t(int index, memaddr param) { |
80 Task *t = (Task*)rbuf; | 81 Task *t = (Task*)rbuf; |
81 t->set_param_t(index, param); | 82 t->set_param_t(index, param); |
82 } | 83 } |
83 | 84 |
85 void init(int cmd) { | |
86 next = prev = NULL; | |
87 waiter = NULL; | |
88 | |
89 command = cmd; | |
90 param_index = 0; | |
91 in_index = 0; | |
92 out_index = 0; | |
93 self = (memaddr) this; | |
94 | |
95 post_func = NULL; | |
96 mimpl = NULL; | |
97 cpu_type = CPU_PPE; | |
98 } | |
84 #define add_param(param) add_param_t((memaddr)(param)) | 99 #define add_param(param) add_param_t((memaddr)(param)) |
85 #define set_param(index,param) set_param_t(index, (memaddr) (param)) | 100 #define set_param(index,param) set_param_t(index, (memaddr) (param)) |
86 | 101 |
87 #define add_inData(addr, size) \ | 102 #define add_inData(addr, size) \ |
88 add_inData_t((memaddr)(addr), (size)); | 103 add_inData_t((memaddr)(addr), (size)); |