Mercurial > hg > Game > Cerium
view example/get_segment/spe/spe-main.cc @ 460:433892ba596b draft
fix Scheduler.h
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 29 Sep 2009 11:51:25 +0900 |
parents | 6c63423a7dea |
children | ca987c0beb11 |
line wrap: on
line source
#include "Func.h" #include "Scheduler.h" #include "createTask_offset.h" SchedExternDynamicTask(Hello,0); SchedExternDynamicTask(Hello1,1); void print_ovly_table(); /** * この関数は SpeScheduler から呼ばれるので * 必ずこの関数名でお願いします。 */ void task_init(Scheduler *scheduler) { SchedRegisterDynamicTask(HELLO_TASK, Hello, 0); SchedRegisterDynamicTask(HELLO_TASK1, Hello1, 1); createTask_Hello(scheduler); scheduler->allocate_code_segment(1024,4); print_ovly_table(); } /* extern struct tbl1 { u32 vma; u32 size; u32 file_offset; u32 buf; } _ovly_table; */ #ifdef NO_OVERLAY void print_ovly_table() {} #else typedef unsigned int u32; extern unsigned long long _EAR_; void print_ovly_table() { int i; struct tbl *ov; ov = _ovly_table; fprintf(stderr,"memaddr = %d\n",sizeof(memaddr)); for(i=0;i<2;i++) { unsigned long long adr = _EAR_; fprintf(stderr,"ovly_table[%d] vma=%08x size=%08x offset=%08x address=%08llx\n", i, ov[i].vma, ov[i].size, ov[i].file_offset, (adr) + ov[i].file_offset); } } #endif /* end */