changeset 275:8622eae386d1

merge
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 04 Jun 2009 00:20:19 +0900
parents 6ecb2b8a2505
children c1b2b613d523
files example/HelloWorld/ppe/#Hello.cc# example/busy_rate/Func.h example/busy_rate/Makefile example/busy_rate/Makefile.def example/busy_rate/Makefile.linux example/busy_rate/Makefile.macosx example/busy_rate/Makefile.ps3 example/busy_rate/busy example/busy_rate/hello example/busy_rate/main.cc example/busy_rate/ppe/busy_rate.cc example/busy_rate/ppe/busy_rate.h example/busy_rate/ppe/task_init.cc example/busy_rate/spe-main example/busy_rate/spe/Makefile example/busy_rate/spe/busy_rate.cc example/busy_rate/spe/busy_rate.h example/busy_rate/spe/spe-main.cc
diffstat 18 files changed, 0 insertions(+), 286 deletions(-) [+]
line wrap: on
line diff
--- a/example/HelloWorld/ppe/#Hello.cc#	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-#include <stdio.h>
-#include "SchedTask.h"
-#include "Hello.h"
-#include "Func.h"
-
-/* ’¤³’¤ì’¤Ï’ɬ’¿Ü */
-
-
-int
-Hello::run(void *rbuf, void *wbuf)
-{
-    int task_id = get_param(0);
-
-    printf("[%d] Hello, World!!\n", task_id);
-
-    return 0;
-}
--- a/example/busy_rate/Func.h	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-enum {
-    BUSY_TASK,
-};
--- a/example/busy_rate/Makefile	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-default: macosx
-
-macosx: FORCE
-	@echo "Make for Mac OS X"
-	@$(MAKE) -f Makefile.macosx
-
-linux: FORCE
-	@echo "Make for Linux"
-	@$(MAKE) -f Makefile.linux
-
-ps3: FORCE
-	@echo "Make for PS3 (Cell)"
-	@$(MAKE) -f Makefile.ps3
-
-FORCE:
-
-clean:
-	@$(MAKE) -f Makefile.macosx clean
-	@$(MAKE) -f Makefile.linux clean
-	@$(MAKE) -f Makefile.ps3 clean
\ No newline at end of file
--- a/example/busy_rate/Makefile.def	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-TARGET = busy
-
-# include/library path
-# ex: macosx
-#CERIUM = /Users/gongo/Source/Cerium
-
-# ex: linux/ps3
-CERIUM = /Users/e065746/Works/lab/hg/hiroki/Game_Project/Cerium
-
-CC      = g++
-CFLAGS  = -g -Wall -O9
-
-INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
-LIBS = -L${CERIUM}/TaskManager
--- a/example/busy_rate/Makefile.linux	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-include ./Makefile.def
-
-SRCS_TMP = $(wildcard *.cc)
-SRCS_EXCLUDE =  # ½ü³°¤¹¤ë¥Õ¥¡¥¤¥ë¤ò½ñ¤¯
-SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
-OBJS = $(SRCS:.cc=.o)
-
-TASK_DIR  = ppe
-TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
-TASK_SRCS_EXCLUDE = 
-TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
-TASK_OBJS = $(TASK_SRCS:.cc=.o)
-
-LIBS += -lFifoManager
-
-.SUFFIXES: .cc .o
-
-.cc.o:
-	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
-
-all: $(TARGET)
-
-$(TARGET): $(OBJS) $(TASK_OBJS)
-	$(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
-
-link:
-	$(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)
-
-debug: $(TARGET)
-	sudo gdb ./$(TARGET) 
-
-clean:
-	rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
-	rm -f *~ \#*
-	rm -f ppe/*~ ppe/\#*
-	rm -f spe/*~ spe/\#*
--- a/example/busy_rate/Makefile.macosx	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-include ./Makefile.def
-
-SRCS_TMP = $(wildcard *.cc)
-SRCS_EXCLUDE =  # ½ü³°¤¹¤ë¥Õ¥¡¥¤¥ë¤ò½ñ¤¯
-SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
-OBJS = $(SRCS:.cc=.o)
-
-TASK_DIR  = ppe
-TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
-TASK_SRCS_EXCLUDE = 
-TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
-TASK_OBJS = $(TASK_SRCS:.cc=.o)
-
-LIBS += -lFifoManager `sdl-config --libs`
-
-.SUFFIXES: .cc .o
-
-.cc.o:
-	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
-
-all: $(TARGET)
-
-$(TARGET): $(OBJS) $(TASK_OBJS)
-	$(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
-
-link:
-	$(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)
-
-debug: $(TARGET)
-	sudo gdb ./$(TARGET) 
-
-clean:
-	rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
-	rm -f *~ \#*
-	rm -f ppe/*~ ppe/\#*
-	rm -f spe/*~ spe/\#*
--- a/example/busy_rate/Makefile.ps3	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-include ./Makefile.def
-
-SRCS_TMP = $(wildcard *.cc)
-SRCS_EXCLUDE =  # ½ü³°¤¹¤ë¥Õ¥¡¥¤¥ë¤ò½ñ¤¯
-SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP))
-OBJS = $(SRCS:.cc=.o)
-
-TASK_DIR  = ppe
-TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc)
-TASK_SRCS_EXCLUDE = 
-TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP))
-TASK_OBJS = $(TASK_SRCS:.cc=.o)
-
-LIBS += -lCellManager -lspe2 -lpthread -Wl,--gc-sections 
-
-.SUFFIXES: .cc .o
-
-.cc.o:
-	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
-
-all: $(TARGET) speobject
-
-$(TARGET): $(OBJS) $(TASK_OBJS)
-	$(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
-
-speobject:
-	cd spe; $(MAKE)
-
-link:
-	$(CC) -o $(TARGET) $(OBJS) $(TASK_OBJS) $(LIBS)
-
-debug: $(TARGET)
-	sudo ppu-gdb ./$(TARGET) 
-
-clean:
-	rm -f $(TARGET) $(OBJS) $(TASK_OBJS)
-	rm -f *~ \#*
-	rm -f ppe/*~ ppe/\#*
-	cd spe; $(MAKE) clean
Binary file example/busy_rate/busy has changed
Binary file example/busy_rate/hello has changed
--- a/example/busy_rate/main.cc	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "TaskManager.h"
-#include "Func.h"
-
-extern void task_init(void);
-
-void
-busy_init(void)
-{
-    HTask *busy;
-
-    for (int i = 0; i < 6; i++) {
-	
-	busy = manager->create_task(BUSY_TASK);
-	busy->set_cpu(SPE_ANY);
-
-	busy->add_param(i);
-	busy->spawn();
-    }
-}
-
-int
-TMmain(int argc, char *argv[])
-{
-    task_init();
-    busy_init();
-
-    return 0;
-}
--- a/example/busy_rate/ppe/busy_rate.cc	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-#include <stdio.h>
-#include "SchedTask.h"
-#include "busy_rate.h"
-#include "Func.h"
-
-
-SchedDefineTask(Busy_rate);
-
-int
-Busy_rate::run(void *rbuf, void *wbuf)
-{
-    int task_id = get_param(0);
-
-    printf("[%d] Busy World!\n", task_id);
-
-    return 0;
-}
--- a/example/busy_rate/ppe/busy_rate.h	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#ifndef INCLUDED_SCHED_TASK
-#  include "SchedTask.h"
-#endif
-
-class Busy_rate : public SchedTask {
-public:
-    SchedConstructor(Busy_rate);
-
-    int run(void *r, void *w);
-};
--- a/example/busy_rate/ppe/task_init.cc	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#include "Func.h"
-#include "Scheduler.h"
-
-SchedExternTask(Busy_rate);
-
-void
-task_init(void)
-{
-    SchedRegisterTask(BUSY_TASK, Busy_rate);
-}
Binary file example/busy_rate/spe-main has changed
--- a/example/busy_rate/spe/Makefile	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-default: macosx
-
-macosx: FORCE
-	@echo "Make for Mac OS X"
-	@$(MAKE) -f Makefile.macosx
-
-linux: FORCE
-	@echo "Make for Linux"
-	@$(MAKE) -f Makefile.linux
-
-ps3: FORCE
-	@echo "Make for PS3 (Cell)"
-	@$(MAKE) -f Makefile.ps3
-
-FORCE:
-
-clean:
-	@$(MAKE) -f Makefile.macosx clean
-	@$(MAKE) -f Makefile.linux clean
-	@$(MAKE) -f Makefile.ps3 clean
\ No newline at end of file
--- a/example/busy_rate/spe/busy_rate.cc	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include "busy_rate.h"
-#include "Func.h"
-
-SchedDefineTask(Busy_rate);
-
-int
-Busy_rate::run(void *rbuf, void *wbuf)
-{
-    printf("Busy World!\n");
-
-    return 0;
-}
--- a/example/busy_rate/spe/busy_rate.h	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#ifndef INCLUDED_SCHED_TASK
-#  include "SchedTask.h"
-#endif
-
-class Busy_rate : public SchedTask {
-public:
-    SchedConstructor(Busy_rate);
-
-    int run(void *r, void *w);
-};
--- a/example/busy_rate/spe/spe-main.cc	Thu Jun 04 00:16:56 2009 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#include "Func.h"
-#include "Scheduler.h"
-
-SchedExternTask(Busy_rate);
-
-void
-task_init(void)
-{
-    SchedRegisterTask(BUSY_TASK, Busy_rate);
-}