view example/task_queue/spe/spe-main.cc @ 496:58240647b23b

PS3 double linked TaskQueue worked.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 10 Oct 2009 20:32:55 +0900
parents 9522c376a9fe
children 36b323130b1b
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));
    
    s->global_set(0, (void *)q);

    q->i = 0;
    q->j = 0;

    for (int i = 0; i < MAX_QUEUE; i++) {
        q->q[i] = new TaskQueueInfo() ;
    }

}