17void RTScheduler::add(uint64_t delta,
RTSchedulable& schedulable)
21 sp.time = std::numeric_limits<uint64_t>::max(); },
22 [](
const RTSyncPoint& x,
const RTSyncPoint& y) {
23 return x.time < y.time; });
26bool RTScheduler::remove(RTSchedulable& schedulable)
28 return queue.remove(EqualRTSchedulable(schedulable));
31bool RTScheduler::isPending(
const RTSchedulable& schedulable)
const
36void RTScheduler::scheduleHelper(uint64_t limit)
41 auto count = queue.size();
43 auto* schedulable = queue.front().schedulable;
46 schedulable->executeRT();
50 if (queue.empty())
break;
51 if (queue.front().time > limit) [[likely]]
break;
52 if (--count == 0)
break;
ALWAYS_INLINE unsigned count(const uint8_t *pIn, const uint8_t *pMatch, const uint8_t *pInLimit)
uint64_t getTime()
Get current (real) time in us.
This file implemented 3 utility functions:
constexpr bool any_of(InputRange &&range, UnaryPredicate pred)
bool operator()(const RTSyncPoint &sp) const
EqualRTSchedulable(const RTSchedulable &schedulable_)
const RTSchedulable & schedulable
RTSchedulable * schedulable