📄 sortedsched.hh
字号:
// -*- 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -