// Custom includes
#include "IdleEvent.hh"
-#ifdef HAVE_TIMERFD
-#include <sys/timerfd.h>
+#ifdef HAVE_TIMERFD_CREATE
+#include TIMERFD_H_PATH
#endif
+#include "senf/Utils/IgnoreValue.hh"
//#include "TimerSource.mpp"
#define prefix_
-///////////////////////////////cc.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::scheduler::detail::TimerSource
prefix_ senf::scheduler::detail::TimerSource::~TimerSource()
{}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::scheduler::detail::POSIXTimerSource
prefix_ senf::scheduler::detail::POSIXTimerSource::POSIXTimerSource()
return;
static char data = '\xD0';
// If the write fails there's not much we can do anyways ...
- (void) write(static_cast<POSIXTimerSource*>(siginfo->si_value.sival_ptr)->timerPipe_[1],
- &data, sizeof(data));
+ senf::IGNORE( write(static_cast<POSIXTimerSource*>(siginfo->si_value.sival_ptr)->timerPipe_[1],
+ &data, sizeof(data)) );
}
prefix_ void senf::scheduler::detail::POSIXTimerSource::signal(int events)
char data;
// This should never fail since we are reading a single character from a signaled
// filedescriptor
- (void) read(timerPipe_[0], &data, sizeof(data));
+ senf::IGNORE( read(timerPipe_[0], &data, sizeof(data)) );
timeoutEnabled_ = false;
}
SENF_THROW_SYSTEM_EXCEPTION("timer_settime()");
}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::scheduler::detail::PollTimerSource
prefix_ void senf::scheduler::detail::PollTimerSource::timeout(ClockService::clock_type timeout)
prefix_ void senf::scheduler::detail::PollTimerSource::disable()
{}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::scheduler::detail::TimerFDTimerSource
-#ifdef HAVE_TIMERFD
+#ifdef HAVE_TIMERFD_CREATE
prefix_ senf::scheduler::detail::TimerFDTimerSource::TimerFDTimerSource()
: timerfd_ (-1), timeoutEnabled_ (false), timeout_ (0)
{
{
uint64_t expirations (0);
// We ignore the return value since we ignore the value read anyways
- (void) read(timerfd_, &expirations, sizeof(expirations));
+ senf::IGNORE( read(timerfd_, &expirations, sizeof(expirations)) );
}
prefix_ void senf::scheduler::detail::TimerFDTimerSource::reschedule()
}
#endif
-///////////////////////////////cc.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#undef prefix_
//#include "TimerSource.mpp"