view example/task_queue/spe/spe-main.cc @ 751:8b45afad160f

add task/DataLoad task/DataUpdate
author hiroki
date Mon, 25 Jan 2010 19:25:40 +0900
parents 36b323130b1b
children da49d9e458dc
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;

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

}