18 #ifndef HH_SENF_Scheduler_Scheduler_ 19 #define HH_SENF_Scheduler_Scheduler_ 1 22 #include <boost/noncopyable.hpp> 219 namespace scheduler {
393 bool blocked()
const;
404 #define SENF_SCHEDULER_WATCHDOG_CHECKPOINT_SET() \ 405 senf::scheduler::detail::FIFORunner::instance().watchdogCheckpoint( \ 406 __FILE__ ":" BOOST_PP_STRINGIZE(__LINE__)); 408 #define SENF_SCHEDULER_WATCHDOG_CHECKPOINT_CLEAR() \ 409 senf::scheduler::detail::FIFORunner::instance().watchdogCheckpoint(nullptr); config::time_type clock_type
ClockService timer data type.
void watchdogAbort(bool flag)
Enable/disable abort on watchdog event.
bool empty()
Return true, if no event is registered, false otherwise.
void loresTimers()
Switch back to using epoll for timing.
boost::function< void(std::string const &, std::string const &, std::string const &, unsigned, unsigned)> WatchdogCallback
void hiresTimers()
Switch to using hi resolution timers.
CyclicTimestamp const & eventTimestamp()
Returns the FIFOrunners current event timestamp (1ms precision)
TimerDispatcher public header.
ClockService::clock_type const & now()
Return (approximate) current time.
scheduler specific time source for Utils/Logger framework
void process()
Event handler main loop.
void terminate()
Called by callbacks to terminate the main loop.
SignalDispatcher public header.
bool usingHiresTimers()
Return true, if using hires times, false otherwise.
bool haveScalableHiresTimers()
return true, if timerfd() timing is available, false otherwise
senf::log::time_type operator()() const
ClockService::clock_type const & eventTime()
Return timestamp of last event.
FdDispatcher public header.
void watchdogTimeout(unsigned ms)
Set watchdog timeout to ms milliseconds.
bool running()
true, if scheduler is running, false otherwise
ClockService::clock_type nowDiff(ClockService::clock_type const &older)
Returns (approximate) time difference between 'older' and now()
void restart()
Restart scheduler.
Temporarily block all signals.
void yield()
Immediately rescheduler.
void watchdogCallback(detail::FIFORunner::WatchdogCallback const &cb)
Set watchdog hanging callback.
unsigned watchdogEvents()
Number of watchdog events.