sortedsched.hh

来自「COPE the first practical network coding 」· HH 代码 · 共 46 行

HH
46
字号
// -*- c-basic-offset: 4 -*-#ifndef CLICK_SORTEDSCHED_HH#define CLICK_SORTEDSCHED_HH/* * =c * BalancedThreadSched([INTERVAL, INCREASING]) * =s IP * bin packing scheduler * =d * * Bin pack tasks onto threads by minimizing variance in load. INTERVAL * specifies the number of ms between each load balance. By default it is 1000 * (1 second). If INCREASING is true, first sort tasks in increasing * order based on cost, then binpack. Otherwise, tasks are decreasingly * sorted. By default, INCREASING is true. * * =a ThreadMonitor, StaticThreadSched */#include <click/element.hh>#include <click/timer.hh>class BalancedThreadSched : public Element { public:    BalancedThreadSched();    ~BalancedThreadSched();      const char *class_name() const	{ return "BalancedThreadSched"; }    int configure(Vector<String> &, ErrorHandler *);    int initialize(ErrorHandler *);    void run_timer();  private:    Timer _timer;    int _interval;    bool _increasing;};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?