# HG changeset patch # User tkaito # Date 1274782408 -32400 # Node ID 74fd8d2a7b9d7363fed637f548a9736b06508b2b # Parent c3fb62d9355fe65e636763745d3163af55bdddf1 example fix 50% diff -r c3fb62d9355f -r 74fd8d2a7b9d TaskManager/kernel/ppe/HTask.cc --- a/TaskManager/kernel/ppe/HTask.cc Tue May 25 03:41:10 2010 +0900 +++ b/TaskManager/kernel/ppe/HTask.cc Tue May 25 19:13:28 2010 +0900 @@ -18,7 +18,7 @@ void HTask::spawn(void) { - mimpl->spawn_task(this); + mimpl->spawn_task(this); } /*! diff -r c3fb62d9355f -r 74fd8d2a7b9d TaskManager/kernel/schedule/Scheduler.h --- a/TaskManager/kernel/schedule/Scheduler.h Tue May 25 03:41:10 2010 +0900 +++ b/TaskManager/kernel/schedule/Scheduler.h Tue May 25 19:13:28 2010 +0900 @@ -46,9 +46,11 @@ } class Scheduler { +private: + TaskManagerImpl* manager_tmp; + public: virtual ~Scheduler(); - BASE_NEW_DELETE(Scheduler); /* variables */ @@ -96,6 +98,7 @@ void* global_get(int id); void global_set(int id, void *addr); void global_free(int id); + //MemList* createMemList(int size, int count); MemList* createMemList(int size, int count); void free_(void *p) { free(p); } @@ -124,7 +127,9 @@ /* manager */ - void set_manager(TaskManagerImpl *m) { manager = m; }; + void set_manager(TaskManagerImpl *m) { + manager = m; + }; /* user */ diff -r c3fb62d9355f -r 74fd8d2a7b9d example/MemList/spe/spe-main.cc --- a/example/MemList/spe/spe-main.cc Tue May 25 03:41:10 2010 +0900 +++ b/example/MemList/spe/spe-main.cc Tue May 25 19:13:28 2010 +0900 @@ -1,5 +1,5 @@ #include "Func.h" -#include "Scheduler.h" +#include "SchedTask.h" SchedExternTask(Hello); @@ -7,6 +7,7 @@ * この関数は SpeScheduler から呼ばれるので * 必ずこの関数名でお願いします。 */ + void task_init(Scheduler *s) { diff -r c3fb62d9355f -r 74fd8d2a7b9d example/get_segment/ppe/Hello.cc --- a/example/get_segment/ppe/Hello.cc Tue May 25 03:41:10 2010 +0900 +++ b/example/get_segment/ppe/Hello.cc Tue May 25 19:13:28 2010 +0900 @@ -34,8 +34,10 @@ #endif - smanager->fprintf(smanager->stderr_,"sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); - smanager->fprintf(smanager->stderr_,"[%d] Main Mem %0lx len %d\n", task_id, (long)next,(int)SIZE); + //smanager->fprintf(smanager->stderr_,"sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); + //smanager->fprintf(smanager->stderr_,"[%d] Main Mem %0lx len %d\n", task_id, (long)next,(int)SIZE); + smanager->printf("sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); + smanager->printf("[%d] Main Mem %0lx len %d\n", task_id, (long)next,(int)SIZE); return 0; } diff -r c3fb62d9355f -r 74fd8d2a7b9d example/get_segment/ppe/Hello1.cc --- a/example/get_segment/ppe/Hello1.cc Tue May 25 03:41:10 2010 +0900 +++ b/example/get_segment/ppe/Hello1.cc Tue May 25 19:13:28 2010 +0900 @@ -33,8 +33,10 @@ #endif - smanager->fprintf(smanager->stderr_,"Hello1 sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); - smanager->fprintf(smanager->stderr_,"[%d] Main Mem %0lx len %d\n", task_id, (unsigned long)next,(int)SIZE); + //smanager->fprintf(smanager->stderr_,"Hello1 sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); + //smanager->fprintf(smanager->stderr_,"[%d] Main Mem %0lx len %d\n", task_id, (unsigned long)next,(int)SIZE); + smanager->printf("Hello1 sizeof(int) = [%d] sizeof(void*)=[%d]\n", (int)sizeof(int),(int)sizeof(void*)); + smanager->printf("[%d] Main Mem %0lx len %d\n", task_id, (unsigned long)next,(int)SIZE); return 0; } diff -r c3fb62d9355f -r 74fd8d2a7b9d example/get_segment/spe/Hello.cc --- a/example/get_segment/spe/Hello.cc Tue May 25 03:41:10 2010 +0900 +++ b/example/get_segment/spe/Hello.cc Tue May 25 19:13:28 2010 +0900 @@ -33,10 +33,15 @@ char *fmt = "char [%0x] offset [%0x]\n"; int offset = rel_offset(); - smanager->fprintf(smanager->stderr_,fmt+offset, fmt, offset); + //smanager->fprintf(smanager->stderr_,fmt+offset, fmt, offset); + + //smanager->fprintf(smanager->stderr_,"[%d] Hello, World!! Seg1 \n"+offset, task_id); + //smanager->fprintf(smanager->stderr_,"pc=0x%0x 0x%0lx\n"+offset,pc, (unsigned long)&runTask_Hello); - smanager->fprintf(smanager->stderr_,"[%d] Hello, World!! Seg1 \n"+offset, task_id); - smanager->fprintf(smanager->stderr_,"pc=0x%0x 0x%0lx\n"+offset,pc, (unsigned long)&runTask_Hello); + smanager->printf(fmt+offset, fmt, offset); + + smanager->printf("[%d] Hello, World!! Seg1 \n"+offset, task_id); + smanager->printf("pc=0x%0x 0x%0lx\n"+offset,pc, (unsigned long)&runTask_Hello); return 0; } diff -r c3fb62d9355f -r 74fd8d2a7b9d example/get_segment/spe/Hello1.cc --- a/example/get_segment/spe/Hello1.cc Tue May 25 03:41:10 2010 +0900 +++ b/example/get_segment/spe/Hello1.cc Tue May 25 19:13:28 2010 +0900 @@ -32,11 +32,13 @@ char *fmt = "char [%0x] offset [%0x]\n"; int offset = rel_offset(); - smanager->fprintf(smanager->stderr_,fmt+offset, fmt, offset); - + //smanager->fprintf(smanager->stderr_,fmt+offset, fmt, offset); + //smanager->fprintf(smanager->stderr_,"[%d] Hello, World Seg 2!!\n"+offset, task_id); + //smanager->fprintf(smanager->stderr_,"pc=0x%0x 0x%0lx\n"+offset,pc, (unsigned long)&runTask_Hello1); - smanager->fprintf(smanager->stderr_,"[%d] Hello, World Seg 2!!\n"+offset, task_id); - smanager->fprintf(smanager->stderr_,"pc=0x%0x 0x%0lx\n"+offset,pc, (unsigned long)&runTask_Hello1); + smanager->printf(fmt+offset, fmt, offset); + smanager->printf("[%d] Hello, World Seg 2!!\n"+offset, task_id); + smanager->printf("pc=0x%0x 0x%0lx\n"+offset,pc, (unsigned long)&runTask_Hello1); return 0; } diff -r c3fb62d9355f -r 74fd8d2a7b9d example/renew_task/spe/Renew1.h --- a/example/renew_task/spe/Renew1.h Tue May 25 03:41:10 2010 +0900 +++ b/example/renew_task/spe/Renew1.h Tue May 25 19:13:28 2010 +0900 @@ -2,7 +2,7 @@ #define INCLUDED_TASK_RENEW1 #ifndef INCLUDED_SCHED_TASK -# include "SchedTask.h" +#include "SchedTask.h" #endif