Go to the documentation of this file.
45 }
else if(q->
len == 1) {
54 }
else if (q->
len == 2) {
83 for (p = q->
top, pp = p->
prev; p != NULL; pp = p, p = p->
next) {
91 #define BUGGER_ON(cond) { \
93 PacketQueueValidateDebug(q); \
100 BUGGER_ON(q->
top != NULL);
101 BUGGER_ON(q->
bot != NULL);
102 }
else if(q->
len == 1) {
103 BUGGER_ON(q->
top != q->
bot);
104 BUGGER_ON(q->
top->
next != NULL);
105 BUGGER_ON(q->
bot->
next != NULL);
106 BUGGER_ON(q->
top->
prev != NULL);
107 BUGGER_ON(q->
bot->
prev != NULL);
108 }
else if (q->
len == 2) {
109 BUGGER_ON(q->
top == NULL);
110 BUGGER_ON(q->
bot == NULL);
112 BUGGER_ON(q->
top == q->
bot);
114 BUGGER_ON(q->
top->
prev != NULL);
118 BUGGER_ON(q->
bot->
next != NULL);
120 BUGGER_ON(q->
top == NULL);
121 BUGGER_ON(q->
bot == NULL);
123 BUGGER_ON(q->
top == q->
bot);
124 BUGGER_ON(q->
top->
prev != NULL);
125 BUGGER_ON(q->
bot->
next != NULL);
131 for (p = q->
top, pp = p->
prev; p != NULL; pp = p, p = p->
next) {
132 BUGGER_ON(pp != p->
prev);
147 if (q->
top != NULL) {
161 if (q->
len > q->dbg_maxlen)
162 q->dbg_maxlen = q->
len;
170 PacketEnqueueDo(q, p);
175 PacketEnqueueDo(q, p);
209 return PacketDequeueDo(q);
214 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)