Mercurial > hg > Game > Cerium
changeset 1588:f7d35318ea76 draft
fix min_cpu() anc max_cpu()
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Mar 2013 22:01:12 +0900 |
parents | ca2e037e30b6 |
children | 06f32d2da877 |
files | TaskManager/kernel/ppe/TaskManagerImpl.cc TaskManager/kernel/ppe/TaskManagerImpl.h TaskManager/kernel/schedule/Scheduler.cc example/multiply/ppe/Multi.cc |
diffstat | 4 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/TaskManagerImpl.cc Sun Mar 31 20:44:05 2013 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.cc Sun Mar 31 22:01:12 2013 +0900 @@ -273,9 +273,9 @@ { task_list->cpu_type = type; if (machineNum==0) - task->cpu_type = CPU_PPE ; + task->cpu_type = CPU_PPE ; else - task->cpu_type = type; + task->cpu_type = type; } #if 0
--- a/TaskManager/kernel/ppe/TaskManagerImpl.h Sun Mar 31 20:44:05 2013 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.h Sun Mar 31 22:01:12 2013 +0900 @@ -69,7 +69,6 @@ virtual void set_task_depend(HTaskPtr master, HTaskPtr slave); virtual void spawn_task(HTaskPtr); virtual void set_task_cpu(HTaskPtr, CPU_TYPE); - virtual int max_cpu()=0; void set_taskList(HTaskPtr htask, QueueInfo<TaskList> * taskList); void free_htask(HTaskPtr htask) {
--- a/TaskManager/kernel/schedule/Scheduler.cc Sun Mar 31 20:44:05 2013 +0900 +++ b/TaskManager/kernel/schedule/Scheduler.cc Sun Mar 31 22:01:12 2013 +0900 @@ -417,13 +417,13 @@ int Scheduler::max_cpu() { // todo - return manager->max_cpu(); + return task_list[0].cpu_type + manager->machineNum-1; } int Scheduler::min_cpu() { // todo - return 0; + return task_list[0].cpu_type; } MemorySegment * @@ -532,5 +532,4 @@ #endif } - /* end */