view TaskManager/kernel/ppe/TaskList.h @ 1464:3f2230d79eba draft

TaskList no compile errors
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Jul 2012 21:16:27 +0900
parents f7e497c8e8a3
children cb57420a8219
line wrap: on
line source

#ifndef INCLUDED_TASKLIST
#define INCLUDED_TASKLIST

#include "base.h"
#include "Task.h"

class HTask;

#define TASK_MAX_SIZE 31

class TaskList { // 1024 byte 
public:
    BASE_NEW_DELETE(TaskList);

    Task *lastTask; // 4 byte
    TaskList *next; // 4 byte
    TaskList *prev; // 4 byte
    TaskList *waiter; // 4 byte
    HTask *self; // 4 byte
    long dummy[3]; // 16 byte
    Task tasks[TASK_MAX_SIZE]; // 32*TASK_MAX_SIZE

    TaskPtr last() { return lastTask; }
    void init() { lastTask = &tasks[TASK_MAX_SIZE]; waiter=this; }
    void initOnce() { }
    void freeOnce() {}

} ;

typedef TaskList* TaskListPtr;

#endif