Mercurial > hg > Members > kono > Cerium
view TaskManager/kernel/ppe/HTaskInfo.h @ 499:eacbcdb23986
still fixing...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Oct 2009 15:42:00 +0900 |
parents | cb5ecfc5aaa3 |
children | 4a2c9ff53605 |
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