Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/HTaskInfo.h @ 499:981aa2f89a80 draft
still fixing...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Oct 2009 15:42:00 +0900 |
parents | bce667ff20b9 |
children | 7ddbe22d4cdb |
line wrap: on
line source
#ifndef INCLUDED_HTASK_INFO #define INCLUDED_HTASK_INFO #include "Task.h" #include "HTask.h" class HTaskInfo : public HTask { public: /* constructor */ HTaskInfo(); BASE_NEW_DELETE(HTaskInfo); /* functions */ HTaskPtr HTaskInfo::create(int cmd); void free_(HTaskPtr queue); void addFirst(HTask* e); void addLast(HTask* e); HTask* getFirst(); HTask* getLast(); int remove(HTask* e); HTask* poll(); void moveToFirst(HTask* e); // or use(); HTask* get(int index); HTask* find(HTask *task); int empty(); void freePool() ; // Iterator HTask* getNext(HTask* q) ; int length(); private: /* variables */ static HTaskInfo taskQueuePool; HTask* first; HTask* last; /* functions */ int extend_pool(int num); void destroy(); }; #endif