Mercurial > hg > Game > Cerium
view TaskManager/Cell/spe/main.cc @ 792:b480fc04206f draft
add light switch
author | yutaka@localhost.localdomain |
---|---|
date | Sun, 02 May 2010 04:17:34 +0900 |
parents | b2b4a1243961 |
children | 382a48afb061 |
line wrap: on
line source
#include <stdio.h> #include "CellScheduler.h" #include "SpeTaskManagerImpl.h" #include "spu_mfcio.h" #include "error.h" #include "SysFunc.h" #include "SchedNop.h" extern unsigned char _end[]; SchedExternTask(ShowTime); SchedExternTask(StartProfile); int main(unsigned long long speid, unsigned long long argc, unsigned long long argv) { CellScheduler *c_scheduler; //const unsigned ls_size = (unsigned)&argc; //unsigned code_size = (unsigned)&_end; //unsigned heap_size = ls_size - code_size; __debug(" ls_size:%10d bytes\n", ls_size); __debug("code_size:%10d bytes\n", code_size); __debug("heap_size:%10d bytes\n", heap_size); TaskManagerImpl *manager = new SpeTaskManagerImpl(); SchedRegister(ShowTime); SchedRegister(StartProfile); c_scheduler = new CellScheduler(); c_scheduler->init(manager); c_scheduler->id = (int)argc; manager->set_scheduler(c_scheduler); c_scheduler->run(new SchedNop()); c_scheduler->finish(); return 0; }