spinlockacquire.hh
来自「COPE the first practical network coding 」· HH 代码 · 共 36 行
HH
36 行
#ifndef CLICK_SPINLOCKACQUIRE_HH#define CLICK_SPINLOCKACQUIRE_HH#include <click/element.hh>#include <click/sync.hh>CLICK_DECLS/* * =c * SpinlockAcquire(S) * =s * acquires spinlock * =d * Acquires the spinlock named S. S must be defined in a SpinlockInfo element. */class SpinlockAcquire : public Element { Spinlock *_lock; public: SpinlockAcquire() : _lock(0) {} ~SpinlockAcquire() {} const char *class_name() const { return "SpinlockAcquire"; } const char *processing() const { return AGNOSTIC; } void notify_ninputs(int n) { set_ninputs(n); } void notify_noutputs(int n) { set_noutputs(n); } int configure(Vector<String> &, ErrorHandler *); Packet *simple_action(Packet *p) { _lock->acquire(); return p; }};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?