# HG changeset patch # User Daichi TOMA # Date 1333457141 -32400 # Node ID b77f32eb137ce9215b4c9eeace87ab7a8259ba6b # Parent 9b0908cb75538d90a9fbdc30f35edd105660f5ad make available diff -r 9b0908cb7553 -r b77f32eb137c TaskManager/kernel/ppe/HTask.cc --- a/TaskManager/kernel/ppe/HTask.cc Fri Mar 30 05:51:29 2012 +0900 +++ b/TaskManager/kernel/ppe/HTask.cc Tue Apr 03 21:45:41 2012 +0900 @@ -77,25 +77,40 @@ @param num_inData 一つのTaskが読み込む Data の数、set_inData の数 @param num_outData 一つのTaskが書き出す Data の数、set_outData の数 @return Task Array へのポインタ - */ + */ +Task * +HTask::create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData) +{ + r_size = Task::calc_size(num_param, num_inData, num_outData)*num_task; + rbuf = (memaddr) mimpl->allocate(r_size); + //printf("r_size %d\n",r_size); + //bzeroするのはcostが高いので外したい + bzero(rbuf,r_size); + Task *task = (Task*)rbuf; + task->init(id, num_param,num_inData,num_outData); +// task->print(); + return task; // first task +} +/* Task * HTask::create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData) { r_size = 0; int sz = Task::calc_size(num_param, num_inData, num_outData); TaskListPtr tl = mimpl->createTaskList(); - if (sz>tl-> sizeof(tl->tasks)) { + if ( (unsigned int) sz > sizeof(tl->tasks)) { mimpl->get_scheduler()->printf("too large task array.\n"); } rbuf = (memaddr)tl; //printf("r_size %d\n",r_size); //bzeroするのはcostが高いので外したい - bzero(tl->tasks,sizeof(tasks)); - Task *task = tl->tasks; + bzero(tl->tasks,sizeof(tl->tasks)); + Task *task = (Task*)tl->tasks; task->init(id, num_param,num_inData,num_outData); // task->print(); return task; // first task } +*/ /*! @brief Task Array の次のTask @@ -109,7 +124,7 @@ Task *first = (Task*)rbuf; if (t==0) { // first->print(); - first->init(id, param_count, inData_count, outData_count); +// first->init(id, 0, 0, 0); return first; } @@ -132,7 +147,7 @@ Task *first = (Task*)rbuf; if (t==0) { // first->print(); - first->init(id, param_count, inData_count, outData_count); +// first->init(id, param_count, inData_count, outData_count); return first; } diff -r 9b0908cb7553 -r b77f32eb137c TaskManager/kernel/ppe/TaskManagerImpl.cc --- a/TaskManager/kernel/ppe/TaskManagerImpl.cc Fri Mar 30 05:51:29 2012 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.cc Tue Apr 03 21:45:41 2012 +0900 @@ -132,6 +132,12 @@ return ta; } +TaskListPtr +TaskManagerImpl::createTaskList() +{ + return NULL; +} + /* call get_task_name from ppu only */ const char * TaskManagerImpl::get_task_name(int cmd) { @@ -314,6 +320,7 @@ if (me->command == TaskArray) { + // ここはtasklistのfreeになる。 free(me->rbuf); }