Mercurial > hg > Game > Cerium
changeset 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 | 5f52612a224d |
children | 009a2db963de |
files | TaskManager/kernel/schedule/Scheduler.h example/get_segment/spe/Makefile example/get_segment/spe/spe-main.cc |
diffstat | 3 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/schedule/Scheduler.h Mon Sep 28 19:19:38 2009 +0900 +++ b/TaskManager/kernel/schedule/Scheduler.h Tue Sep 29 11:51:25 2009 +0900 @@ -191,13 +191,17 @@ BASE_NEW_DELETE(str) \ #define SchedDefineTask(str) \ + extern "C" { \ SchedTask* createTask_##str(Scheduler *manager) \ { \ return new str(); \ + } \ } #define SchedExternTask(str) \ - extern SchedTask* createTask_##str(Scheduler *manager) ; + extern "C" { \ + extern SchedTask* createTask_##str(Scheduler *manager) ; \ + } #define SchedRegisterTask(cmd, str) \ register_task(cmd, createTask_##str);
--- a/example/get_segment/spe/Makefile Mon Sep 28 19:19:38 2009 +0900 +++ b/example/get_segment/spe/Makefile Tue Sep 29 11:51:25 2009 +0900 @@ -9,8 +9,8 @@ CC = spu-g++ INCLUDE = -I../${CERIUM}/include/TaskManager -I. -I.. -CFLAGS = $(INCLUDE) -O0 -g -Wall -fno-exceptions -fno-rtti#-DDEBUG -# CFLAGS = -DNO_OVERLAY=1 $(CFLAGS) +CFLAGS1 = $(INCLUDE) -O1 -g -Wall -fno-exceptions -fno-rtti #-DDEBUG +CFLAGS = -DNO_OVERLAY=1 $(CFLAGS1) LIBS = -L../${CERIUM}/TaskManager -lspemanager -Wl,--gc-sections SPELIBS = -Wl,-T,$(LDSCRIPT) -Wl,-N $(LIBS)
--- a/example/get_segment/spe/spe-main.cc Mon Sep 28 19:19:38 2009 +0900 +++ b/example/get_segment/spe/spe-main.cc Tue Sep 29 11:51:25 2009 +0900 @@ -22,8 +22,6 @@ print_ovly_table(); } -typedef unsigned int u32; -extern unsigned long long _EAR_; /* extern struct tbl1 { @@ -34,11 +32,13 @@ } _ovly_table; */ -#if 0 -unsigned long long _EAR_ = 0; -struct tbl _ovly_table; -#endif +#ifdef NO_OVERLAY +void +print_ovly_table() {} +#else +typedef unsigned int u32; +extern unsigned long long _EAR_; void print_ovly_table() { @@ -57,5 +57,6 @@ (adr) + ov[i].file_offset); } } +#endif /* end */