msqueue.hh

来自「Click is a modular router toolkit. To us」· HH 代码 · 共 55 行

HH
55
字号
#ifndef CLICK_MSQUEUE_HH#define CLICK_MSQUEUE_HH#include "threadsafequeue.hh"CLICK_DECLS/* * =c * MSQueue * MSQueue(CAPACITY) * =deprecated ThreadSafeQueue * =s smpclick * stores packets in a FIFO queue * =d * Stores incoming packets in a multiple producer single consumer * first-in-first-out queue. Enqueue operations are synchronized, dequeue * operations are not. Drops incoming packets if the queue already holds * CAPACITY packets. The default for CAPACITY is 1000. * * =h length read-only * Returns the current number of packets in the queue. * =h dropd read-only * Returns the number of packets dropped by the queue so far. * =h capacity read/write * Returns or sets the queue's capacity. * =a Queue */class MSQueue : public ThreadSafeQueue { public:    MSQueue();    ~MSQueue();    const char *class_name() const		{ return "MSQueue"; }    void *cast(const char *);    int configure(Vector<String> &, ErrorHandler *);#if CLICK_LINUXMODULE && __i386__ && HAVE_INTEL_CPU    static void prefetch_packet(Packet *p);#endif};#if CLICK_LINUXMODULE && __i386__ && HAVE_INTEL_CPUinline voidMSQueue::prefetch_packet(Packet *p){  struct sk_buff *skb = p->skb();  asm volatile("prefetcht0 %0" : : "m" (skb->data));}#endifCLICK_ENDDECLS#endif

⌨️ 快捷键说明

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