Mercurial > hg > Members > kono > Cerium
view TaskManager/kernel/ppe/TaskListInfo.h @ 801:974cd68383b3
TaslListInfo
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 22 May 2010 18:20:16 +0900 |
parents | eacbcdb23986 |
children | 8a6f1fa038de |
line wrap: on
line source
#ifndef INCLUDED_TASK_LIST_INFO #define INCLUDED_TASK_LIST_INFO #include "types.h" #include "TaskList.h" class TaskListInfo : public TaskList { public: /* constructor */ TaskListInfo(); BASE_NEW_DELETE(TaskListInfo); /* functions */ TaskListPtr create(); void free_(TaskListPtr queue); void addFirst(TaskList* e); void addLast(TaskList* e); TaskList* getFirst(); TaskList* getLast(); int remove(TaskList* e); TaskList* poll(); void moveToFirst(TaskList* e); // or use(); TaskList* get(int index); TaskList* find(TaskList *task); int empty(); void freePool() ; // Iterator TaskList* getNext(TaskList* q) ; int length(); private: /* variables */ static TaskListInfo taskListPool; TaskList* first; TaskList* last; /* functions */ int extend_pool(int num); void destroy(); }; typedef TaskListInfo *TaskListInfoPtr; #endif