Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/TaskList.h @ 1506:a7895ab4d0e3 draft
add flip flag and NDRange flag
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 10 Sep 2012 15:04:39 +0900 |
parents | cb57420a8219 |
children | 806b4658ced6 |
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); long 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 (TaskPtr)(((memaddr)tasks)+lastTask); } void set_last(Task *t) { lastTask = ((memaddr)t) - ((memaddr)tasks); } void init() { lastTask = ((memaddr)&tasks[TASK_MAX_SIZE])-(memaddr)(tasks); waiter=this; } void initOnce() { } void freeOnce() {} } ; typedef TaskList* TaskListPtr; #endif