⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spinlockacquire.hh

📁 Click is a modular router toolkit. To use it you ll need to know how to compile and install the sof
💻 HH
字号:
#ifndef CLICK_SPINLOCKACQUIRE_HH#define CLICK_SPINLOCKACQUIRE_HH#include <click/element.hh>#include <click/sync.hh>CLICK_DECLS/* * =c * SpinlockAcquire(LOCK) * =s threads * acquires spinlock * =d * Acquires the spinlock named LOCK. LOCK must be defined in a SpinlockInfo * element. * =a SpinlockInfo, SpinlockRelease */class SpinlockAcquire : public Element { public:    SpinlockAcquire()			: _lock(0) {}    ~SpinlockAcquire()			{}    const char *class_name() const	{ return "SpinlockAcquire"; }    const char *port_count() const	{ return PORTS_1_1; }    int configure(Vector<String> &, ErrorHandler *);    Packet *simple_action(Packet *p)	{ _lock->acquire(); return p; }  private:    Spinlock *_lock;};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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