changeset 1188:ad64e2b20a9f draft

Merge with 26dea600d4cd3d5bc2064c29ea4f364bb824b994
author Daichi TOMA
date Thu, 07 Jul 2011 13:50:56 +0900
parents d4311f83377a (current diff) 26dea600d4cd (diff)
children 898fdcf53c31
files
diffstat 9 files changed, 21 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Test/ball_bound.cc	Thu Jul 07 13:31:02 2011 +0900
+++ b/Renderer/Test/ball_bound.cc	Thu Jul 07 13:50:56 2011 +0900
@@ -52,7 +52,7 @@
     }
 }
 
-static int time = 0;
+static int time_val = 0;
 
 static void
 ball_move_idle(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
@@ -62,19 +62,19 @@
 
     if (pad->circle.isPush()) {
 		node->set_move_collision(ball_move_idle2, ball_collision_idle);
-		time = 0;
+		time_val = 0;
     }
 
-    time++;
+    time_val++;
 
-    if (time > 90) {
+    if (time_val > 90) {
 		float w = (float)random();
       
 		w = fmodf(w, screen_w - ball_radius*2);
 		node->xyz[0] = w + ball_radius;
 		node->xyz[1] = h0;
 		node->set_move_collision(ball_move, ball_collision);
-		time = 0;
+		time_val = 0;
     }
 }
 
--- a/TaskManager/Cell/CellTaskManagerImpl.cc	Thu Jul 07 13:31:02 2011 +0900
+++ b/TaskManager/Cell/CellTaskManagerImpl.cc	Thu Jul 07 13:50:56 2011 +0900
@@ -12,7 +12,7 @@
 #include "SysFunc.h"
 
 static void send_alloc_reply(CellTaskManagerImpl *tm, int id,
-		CpuThreads *speThreads);
+		Threads *speThreads);
 
 CellTaskManagerImpl::~CellTaskManagerImpl() {
 
@@ -284,7 +284,7 @@
 }
 
 static void send_alloc_reply(CellTaskManagerImpl *tm, int id,
-		CpuThreads *speThreads) {
+		Threads *speThreads) {
 
 	/**
 	 * info[0] = alloc_id; (CellScheduler::mainMem_alloc 参照)
@@ -357,7 +357,7 @@
 TaskManagerImpl*
 create_impl(int num)
 {
-	CpuThreads* cpus = new SpeThreads(machineNum);
+	Threads *cpus = new SpeThreads(num);
 	cpus->init();
 	return new CellTaskManagerImpl(num,cpus);
 }
--- a/TaskManager/Cell/CellTaskManagerImpl.h	Thu Jul 07 13:31:02 2011 +0900
+++ b/TaskManager/Cell/CellTaskManagerImpl.h	Thu Jul 07 13:50:56 2011 +0900
@@ -4,18 +4,19 @@
 #include "TaskManagerImpl.h"
 #include "FifoTaskManagerImpl.h"
 #include "CpuThreads.h"
+#include "SpeThreads.h"
 
 class CellTaskManagerImpl : public TaskManagerImpl {
 public:
     /* constructor */
-    CellTaskManagerImpl(int num, CpuThreads *cpus) : TaskManagerImpl(num) {speThreads = cpus;}
+    CellTaskManagerImpl(int num, Threads *cpus) : TaskManagerImpl(num) {speThreads = cpus;}
     ~CellTaskManagerImpl();
 
     /* variables */
     QueueInfo<TaskList> **taskListInfo;
     QueueInfo<TaskList> **speTaskList;  // running task
 
-    CpuThreads *speThreads;
+    Threads *speThreads;
     FifoTaskManagerImpl *ppeManager;
     int spe_running;
     int spuIdle;
--- a/TaskManager/Cell/SpeThreads.h	Thu Jul 07 13:31:02 2011 +0900
+++ b/TaskManager/Cell/SpeThreads.h	Thu Jul 07 13:50:56 2011 +0900
@@ -13,7 +13,7 @@
 } thread_arg_t;
 
 
-class SpeThreads : Threads {
+class SpeThreads : public Threads {
 public:
     /* constructor */
     SpeThreads(int num = 1);
--- a/TaskManager/Fifo/FifoTaskManagerImpl.cc	Thu Jul 07 13:31:02 2011 +0900
+++ b/TaskManager/Fifo/FifoTaskManagerImpl.cc	Thu Jul 07 13:50:56 2011 +0900
@@ -11,7 +11,6 @@
 #include "error.h"
 #include "SchedNop.h"
 #include "SysFunc.h"
-#include "CpuThreads.h"
 
 extern  QueueInfo<TaskList> *taskListPool;
 
@@ -318,7 +317,7 @@
 	if (num == 0) {
     return new FifoTaskManagerImpl(num);
 	} else {
-		CpuThreadsPtr cpus = new CpuThreads(num);
+		Threads *cpus = new CpuThreads(num);
 		cpus->init();
 		return new CellTaskManagerImpl(num,cpus);
 	}
--- a/TaskManager/Fifo/FifoTaskManagerImpl.h	Thu Jul 07 13:31:02 2011 +0900
+++ b/TaskManager/Fifo/FifoTaskManagerImpl.h	Thu Jul 07 13:50:56 2011 +0900
@@ -4,6 +4,7 @@
 #include "TaskManagerImpl.h"
 #include "MainScheduler.h"
 #include "Scheduler.h"
+#include "CpuThreads.h"
 
 class FifoTaskManagerImpl : public TaskManagerImpl {
 public:
--- a/TaskManager/Makefile.fifo	Thu Jul 07 13:31:02 2011 +0900
+++ b/TaskManager/Makefile.fifo	Thu Jul 07 13:50:56 2011 +0900
@@ -12,7 +12,11 @@
 all: default
 default: $(TARGET)
 
-ALL_OBJS = $(KERN_MAIN_OBJS) $(KERN_PPE_OBJS) $(KERN_SCHED_OBJS) $(KERN_SYSTASK_OBJS) $(IMPL_FIFO_OBJS) $(KERN_MEM_OBJS)
+ALL_OBJS = $(KERN_MAIN_OBJS) $(KERN_PPE_OBJS) $(KERN_SCHED_OBJS) \
+	   $(KERN_SYSTASK_OBJS) $(IMPL_FIFO_OBJS) $(KERN_MEM_OBJS) \
+	   Cell/spe/SpeTaskManagerImpl.o Cell/CellTaskManagerImpl.o \
+	   Cell/spe/ShowTime.o Cell/spe/StartProfile.o
+
 
 Makefile.dep: 
 	make -f Makefile.fifo depend
--- a/TaskManager/kernel/ppe/CpuThreads.h	Thu Jul 07 13:31:02 2011 +0900
+++ b/TaskManager/kernel/ppe/CpuThreads.h	Thu Jul 07 13:50:56 2011 +0900
@@ -15,7 +15,7 @@
     SemPtr wait;
 } cpu_thread_arg_t;
 
-class CpuThreads : Threads {
+class CpuThreads : public Threads {
 public:
     /* constructor */
     CpuThreads(int num = 1, int start_id = 0);
--- a/TaskManager/kernel/ppe/Threads.h	Thu Jul 07 13:31:02 2011 +0900
+++ b/TaskManager/kernel/ppe/Threads.h	Thu Jul 07 13:50:56 2011 +0900
@@ -20,6 +20,7 @@
     virtual int get_mail(int speid, int count, memaddr *ret) = 0; // BLOCKING
     virtual int has_mail(int speid, int count, memaddr *ret) = 0; // NONBLOCK
     virtual void send_mail(int speid, int num, memaddr *data) = 0; // BLOCKING
+	virtual void add_output_tasklist(int command, memaddr buff, int alloc_size) = 0;
 
     /* variables */
     pthread_t *threads;