view include/TaskManager/TaskList.h @ 244:59c3b9df3c67

mail modify
author e065746@localhost.localdomain
date Sun, 31 May 2009 20:08:42 +0900
parents 5c194c71eca8
children bcb81858aa62
line wrap: on
line source

#ifndef INCLUDED_TASKLIST
#define INCLUDED_TASKLIST

#ifndef INCLUDED_BASE_H_
#  include "base.h"
#endif

#ifndef INCLUDED_TASK
#  include "Task.h"
#endif

// sizeof(Task)*TASK_MAX_SIZE = 512 byte
#define TASK_MAX_SIZE 16

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

    int length; // 4 byte
    TaskList *next; // 4 byte
    Task tasks[TASK_MAX_SIZE]; // 512
    TaskList *output; // 4 byte
    int a[1]; // padding

    static TaskList* append(TaskList*, TaskList*);
};

typedef TaskList* TaskListPtr;

#endif