Mercurial > hg > Game > Cerium
changeset 1185:26dea600d4cd draft
fix CellTaskManagerImpl
author | Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 07 Jul 2011 13:47:07 +0900 |
parents | 8fd004a3f02c |
children | ad64e2b20a9f |
files | TaskManager/Cell/CellTaskManagerImpl.cc TaskManager/Cell/CellTaskManagerImpl.h TaskManager/Cell/SpeThreads.h TaskManager/Fifo/FifoTaskManagerImpl.cc TaskManager/Fifo/FifoTaskManagerImpl.h TaskManager/kernel/ppe/CpuThreads.h TaskManager/kernel/ppe/Threads.h |
diffstat | 7 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Cell/CellTaskManagerImpl.cc Sun Jul 03 17:22:12 2011 +0900 +++ b/TaskManager/Cell/CellTaskManagerImpl.cc Thu Jul 07 13:47:07 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 Sun Jul 03 17:22:12 2011 +0900 +++ b/TaskManager/Cell/CellTaskManagerImpl.h Thu Jul 07 13:47:07 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 Sun Jul 03 17:22:12 2011 +0900 +++ b/TaskManager/Cell/SpeThreads.h Thu Jul 07 13:47:07 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 Sun Jul 03 17:22:12 2011 +0900 +++ b/TaskManager/Fifo/FifoTaskManagerImpl.cc Thu Jul 07 13:47:07 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 Sun Jul 03 17:22:12 2011 +0900 +++ b/TaskManager/Fifo/FifoTaskManagerImpl.h Thu Jul 07 13:47:07 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/kernel/ppe/CpuThreads.h Sun Jul 03 17:22:12 2011 +0900 +++ b/TaskManager/kernel/ppe/CpuThreads.h Thu Jul 07 13:47:07 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 Sun Jul 03 17:22:12 2011 +0900 +++ b/TaskManager/kernel/ppe/Threads.h Thu Jul 07 13:47:07 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;