view TaskManager/Cell/spe/TaskArray.cc @ 688:77c89477daa8 draft

on going...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 06 Dec 2009 18:53:46 +0900
parents
children 97adb3fe85c6
line wrap: on
line source

#include "Finish.h"
#include "SysFunc.h"
#include "Scheduler.h"
#include "Task.h"


SchedDefineTask(TaskArray);

#ifdef SIMPLE_TASK
static Task *
next(Task *t) 
{
    char *p = (char*)t;
    p += t->size();
    return (Task*)p;
}
#endif

static int
run(SchedTask *s,void *rbuf, void *wbuf)
{
#ifdef SIMPLE_TASK
    Task *task = (Task *)rbuf;
    Task *last = ((char*)rbuf)+ s->read_size();
   
    while( task <  last) {
	task->print(s);
	task = next(task);
    }
#endif

    return 0;
}