Go to the documentation of this file.
46 }
else if(q->
len == 1) {
55 }
else if (q->
len == 2) {
84 for (p = q->
top, pp = p->
prev; p != NULL; pp = p, p = p->
next) {
92 #define BUGGER_ON(cond) { \
94 PacketQueueValidateDebug(q); \
101 BUGGER_ON(q->
top != NULL);
102 BUGGER_ON(q->
bot != NULL);
103 }
else if(q->
len == 1) {
104 BUGGER_ON(q->
top != q->
bot);
105 BUGGER_ON(q->
top->
next != NULL);
106 BUGGER_ON(q->
bot->
next != NULL);
107 BUGGER_ON(q->
top->
prev != NULL);
108 BUGGER_ON(q->
bot->
prev != NULL);
109 }
else if (q->
len == 2) {
110 BUGGER_ON(q->
top == NULL);
111 BUGGER_ON(q->
bot == NULL);
113 BUGGER_ON(q->
top == q->
bot);
115 BUGGER_ON(q->
top->
prev != NULL);
119 BUGGER_ON(q->
bot->
next != NULL);
121 BUGGER_ON(q->
top == NULL);
122 BUGGER_ON(q->
bot == NULL);
124 BUGGER_ON(q->
top == q->
bot);
125 BUGGER_ON(q->
top->
prev != NULL);
126 BUGGER_ON(q->
bot->
next != NULL);
132 for (p = q->
top, pp = p->
prev; p != NULL; pp = p, p = p->
next) {
133 BUGGER_ON(pp != p->
prev);
148 if (q->
top != NULL) {
162 if (q->
len > q->dbg_maxlen)
163 q->dbg_maxlen = q->
len;
172 PacketEnqueueDo(q, p);
177 PacketEnqueueDo(q, p);
211 Packet *p = PacketDequeueDo(q);
218 return PacketDequeueDo(q);
void PacketEnqueue(PacketQueue *q, Packet *p)
simple fifo queue for packets with mutex and cond Calling the mutex or triggering the cond is respons...
simple fifo queue for packets
Packet * PacketDequeueNoLock(PacketQueueNoLock *qnl)
#define SCMutexInit(mut, mutattrs)
void PacketEnqueueNoLock(PacketQueueNoLock *qnl, Packet *p)
Packet * PacketDequeue(PacketQueue *q)
PacketQueue * PacketQueueAlloc(void)
void PacketQueueFree(PacketQueue *pq)
#define DEBUG_VALIDATE_BUG_ON(exp)