X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Scheduler%2FTimerSource.hh;h=c52034838e301e8018f3c3241adb8d6c23bd0dc8;hb=81f84badf27b66dbadec9890646ca1193e998505;hp=4ae57193361450e0b651d3d4e40e9178e3f10b4f;hpb=dba87b88225e473a7470f64c7c3d56e04788c90e;p=senf.git diff --git a/Scheduler/TimerSource.hh b/Scheduler/TimerSource.hh index 4ae5719..c520348 100644 --- a/Scheduler/TimerSource.hh +++ b/Scheduler/TimerSource.hh @@ -92,6 +92,32 @@ namespace detail { virtual void disable(); }; +#ifdef HAVE_TIMERFD + class TimerFDTimerSource + : public detail::FdManager::Event, public TimerSource + { + public: + TimerFDTimerSource(); + ~TimerFDTimerSource(); + + virtual void timeout(ClockService::clock_type timeout); + virtual void notimeout(); + + virtual void enable(); + virtual void disable(); + + static bool haveTimerFD(); + + private: + virtual void signal(int events); + void reschedule(); + + int timerfd_; + bool timeoutEnabled_; + ClockService::clock_type timeout_; + }; +#endif + }}} ///////////////////////////////hh.e////////////////////////////////////////