Mercurial > hg > Members > kono > Cerium
changeset 502:36b323130b1b
Renew Task addInData (not yet worked).
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Oct 2009 19:12:05 +0900 |
parents | 4a2c9ff53605 |
children | 30568cef3899 |
files | TaskManager/kernel/schedule/DmaManager.h TaskManager/kernel/schedule/SchedTask.cc example/renew_task/spe/Renew1.cc example/task_queue/spe/Hello.cc example/task_queue/spe/spe-main.cc |
diffstat | 5 files changed, 18 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/schedule/DmaManager.h Sun Oct 11 18:20:33 2009 +0900 +++ b/TaskManager/kernel/schedule/DmaManager.h Sun Oct 11 19:12:05 2009 +0900 @@ -8,8 +8,8 @@ enum dma_tag { DMA_READ = 25, DMA_WRITE = 27, - DMA_READ_IN_LIST = 29, - DMA_READ_OUT_LIST = 30, +// DMA_READ_IN_LIST = 29, +// DMA_READ_OUT_LIST = 30, DMA_READ_TASKLIST = 31, };
--- a/TaskManager/kernel/schedule/SchedTask.cc Sun Oct 11 18:20:33 2009 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.cc Sun Oct 11 19:12:05 2009 +0900 @@ -150,7 +150,15 @@ taskGroup = (TaskGroupPtr)task->self; } +void +SchedTask::read() +{ + (this->*ex_read)(); +} + /** + * PPE 内で生成されたタスクの ex_read() + * * [Todo] * データの読み込み場所を readbuf ではなく、 * ユーザ自身で決めれるようになるといいかもしれない。 @@ -160,7 +168,7 @@ * # もちろん管理はユーザに任せるわけだ。 */ void -SchedTask::read() +SchedTask::ex_read_normal() { __debug("[SchedTask:%s]\n", __FUNCTION__); @@ -184,7 +192,6 @@ scheduler->dma_wait(DMA_READ); #endif - (this->*ex_read)(); } void @@ -236,13 +243,6 @@ (this->*ex_write)(); } -/** - * PPE 内で生成されたタスクの ex_read() - */ -void -SchedTask::ex_read_normal() -{ -} /** * SPE 内で生成されたタスクの ex_read() @@ -250,6 +250,7 @@ void SchedTask::ex_read_renew() { + writebuf = scheduler->allocate(outListData->size); } /**
--- a/example/renew_task/spe/Renew1.cc Sun Oct 11 18:20:33 2009 +0900 +++ b/example/renew_task/spe/Renew1.cc Sun Oct 11 19:12:05 2009 +0900 @@ -13,7 +13,7 @@ profile->ProfStop(); profile->ProfPrint(); - int *test_num = (int *)s->get_input(0); + int *test_num = (int *)s->get_input(rbuf,0); s->printf("[SPE] test_num = %d\n", *test_num); s->printf("[SPE] ** running Renew1\n");
--- a/example/task_queue/spe/Hello.cc Sun Oct 11 18:20:33 2009 +0900 +++ b/example/task_queue/spe/Hello.cc Sun Oct 11 19:12:05 2009 +0900 @@ -13,6 +13,8 @@ smanager->printf("[%d] Hello, World!!\n", task_id); +#if 0 +we don't have TaskQueue in spu QueuePtr q = (QueuePtr )smanager->global_get(0); for(int i=0;i<100;i++) { @@ -49,6 +51,7 @@ break; } } +#endif return 0;