2#ifndef CLICK_IDLETASK_HH
3#define CLICK_IDLETASK_HH
6#include <click/master.hh>
24 IdleTask(
Element* e) : _e(e), _next(0), _active(false), _due(0),_min_interval(0) {
28 return likely(_active && (!_min_interval || now >= _due));
35 return _e->run_idle_task(
this);
38 void initialize(
Element *owner,
int tid,
int min_msec = 0)
42 _min_interval = min_msec;
44 _next = thread->_idletask;
45 thread->_idletask =
this;
46 thread->_idle_dorun = 0;
An atomic 32-bit integer.
Base class for Click elements.
Definition element.hh:42
Router * router() const
Return the element's router.
Definition element.hh:515
A router configuration.
Definition router.hh:28
Master * master() const
Return the Master object for this router.
Definition router.hh:591
A set of Tasks scheduled on the same CPU.
Definition routerthread.hh:32
Represents a moment or interval in time.
Definition timestamp.hh:125
static Timestamp make_msec(seconds_type sec, uint32_t msec)
Return a timestamp representing sec seconds plus msec milliseconds.
Definition timestamp.hh:332
Click's classes for supporting exponentially weighted moving averages.
The Router class implementing a router configuration.
Classes for synchronizing among multiple CPUs, particularly in the Linux kernel.