Mercurial > hg > Members > kono > Cerium
view example/task_queue/spe/spe-main.cc @ 828:da49d9e458dc
example fix 30% done.
author | tkaito |
---|---|
date | Tue, 25 May 2010 03:40:11 +0900 |
parents | 36b323130b1b |
children |
line wrap: on
line source
#include "Func.h" #include "Scheduler.h" #include "main.h" SchedExternTask(Hello); /** * この関数は SpeScheduler から呼ばれるので * 必ずこの関数名でお願いします。 */ void task_init(Scheduler *s) { SchedRegisterTask(HELLO_TASK, Hello); //QueuePtr q = (QueuePtr) s->allocate(sizeof(Queues)); QueuePtr q = (QueuePtr) s->global_alloc(0, sizeof(Queues)); s->global_set(0, (void *)q); q->i = 0; q->j = 0; #if 0 for (int i = 0; i < MAX_QUEUE; i++) { q->q[i] = new TaskQueueInfo() ; } #endif }