X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fvisitor%2FPipeAndFilter%2Flib%2FScheduler.h;fp=dol%2Fsrc%2Fdol%2Fvisitor%2FPipeAndFilter%2Flib%2FScheduler.h;h=791f6f0dccc02e7ad9f7d7bf2cd9d0b37bde12be;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/visitor/PipeAndFilter/lib/Scheduler.h b/dol/src/dol/visitor/PipeAndFilter/lib/Scheduler.h new file mode 100644 index 0000000..791f6f0 --- /dev/null +++ b/dol/src/dol/visitor/PipeAndFilter/lib/Scheduler.h @@ -0,0 +1,35 @@ +#ifndef _SCHEDULER_H_ +#define _SCHEDULER_H_ + +#include +#include +#include +#include "Event.h" +#include "ProcessWrapper.h" + +class Scheduler +{ + public: + Scheduler(); + virtual ~Scheduler(); + + void registerProcess(ProcessWrapper *process); + void run(); + void runProcessWrapper(ProcessWrapper *process); + void detachProcess(ProcessWrapper *process); + void schedule(); + + protected: + Mutex *_listsMutex; + Condition *_listsCondition; + Mutex *_mapsMutex; + Condition *_mapsCondition; + std::map *_processMap; + std::map *_notificationEventMap; + std::list *_scheduleList; + std::list *_detachList; + bool _stopScheduler; + bool _allStarted; +}; + +#endif