comparison TaskManager/kernel/schedule/Scheduler.cc @ 621:5b178db5988a

Cell fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 15 Nov 2009 03:34:18 +0900
parents 0decff4e867b
children 60aa3f241b10
comparison
equal deleted inserted replaced
620:55ed910d13c2 621:5b178db5988a
2 #include <stdlib.h> 2 #include <stdlib.h>
3 #include "Scheduler.h" 3 #include "Scheduler.h"
4 #include "SchedNop.h" 4 #include "SchedNop.h"
5 #include "error.h" 5 #include "error.h"
6 #include <assert.h> 6 #include <assert.h>
7 #include "TaskManagerImpl.h"
7 8
8 /* 9 /*
9 * Edit kernel/schedule/xx.cc, Cell/spe/xx.cc will be over writen by this. 10 * Edit kernel/schedule/xx.cc, Cell/spe/xx.cc will be over writen by this.
10 * Do not edit Cell/spe/xx.cc unless there is no kernel/schedule/xx.cc files. 11 * Do not edit Cell/spe/xx.cc unless there is no kernel/schedule/xx.cc files.
11 */ 12 */
390 391
391 if (s->tag) dma_wait(s->tag); 392 if (s->tag) dma_wait(s->tag);
392 s->tag = 0; 393 s->tag = 0;
393 } 394 }
394 395
396 HTask * Scheduler::create_task(int cmd) { return manager->create_task(cmd); }
397 void Scheduler::set_task_depend(HTask * master, HTask * slave) {
398 manager->set_task_depend(master, slave) ;
399 }
400 void Scheduler::spawn_task(HTask * t) { manager->spawn_task(t); }
401 void Scheduler::set_task_cpu(HTask * t, CPU_TYPE cpu) { manager->set_task_cpu(t,cpu); }
402 void* Scheduler::allocate(int size,int align) { return allocate(size); }
403 long Scheduler::get_random() {
404 #if defined(__SPU__)
405 return 0;
406 #else
407 return random();
408 #endif
409
410 }
411
395 /* end */ 412 /* end */