X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Scheduler%2FFIFORunner.hh;h=1bfdd16a4de300803b90699c2dd891031f73bd57;hb=5158ab14205f56ba33fe72ce1e1914c7d46430fd;hp=8803f7590957a7321cf128fde522243155be8fa8;hpb=c7ddbbb0bc014bdfe6daef91e2d1c512d77e9fff;p=senf.git diff --git a/Scheduler/FIFORunner.hh b/Scheduler/FIFORunner.hh index 8803f75..1bfdd16 100644 --- a/Scheduler/FIFORunner.hh +++ b/Scheduler/FIFORunner.hh @@ -23,14 +23,14 @@ /** \file \brief FIFORunner public header */ -#ifndef HH_FIFORunner_ -#define HH_FIFORunner_ 1 +#ifndef HH_SENF_Scheduler_FIFORunner_ +#define HH_SENF_Scheduler_FIFORunner_ 1 // Custom includes #include #include -#include "../boost/intrusive/ilist.hpp" -#include "../boost/intrusive/ilist_hook.hpp" +#include +#include #include "../Utils/singleton.hh" #include "EventManager.hh" @@ -99,12 +99,19 @@ namespace detail { void taskTimeout(unsigned ms); unsigned taskTimeout() const; + void abortOnTimeout(bool flag); + bool abortOnTimeout() const; - unsigned hangCount() const; + void startWatchdog(); + void stopWatchdog(); + + unsigned hangCount(); iterator begin() const; iterator end() const; + void yield(); + protected: private: @@ -112,6 +119,7 @@ namespace detail { ~FIFORunner(); static void watchdog(int, siginfo_t *, void *); + void watchdogError(); TaskList::iterator priorityEnd(TaskInfo::Priority p); void run(TaskList::iterator f, TaskList::iterator l); @@ -132,13 +140,16 @@ namespace detail { NullTask highPriorityEnd_; timer_t watchdogId_; + bool watchdogRunning_; unsigned watchdogMs_; + bool watchdogAbort_; std::string runningName_; # ifdef SENF_DEBUG std::string runningBacktrace_; # endif unsigned watchdogCount_; unsigned hangCount_; + bool yield_; friend void senf::scheduler::restart(); friend class singleton;