X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Scheduler%2FFIFORunner.hh;h=23f0620c7e1ba9878220512318e4784f340ec90c;hb=44d9219e6dbfc94f8a6d40a352b2d01eff6fca7c;hp=11ab3ee737e24365a30114fb54929da2f43de862;hpb=412024ed31a4ab4eaea7a4165a434f8efebee325;p=senf.git diff --git a/Scheduler/FIFORunner.hh b/Scheduler/FIFORunner.hh index 11ab3ee..23f0620 100644 --- a/Scheduler/FIFORunner.hh +++ b/Scheduler/FIFORunner.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;