repo.or.cz
/
zen-stable.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Avoid beyond bounds copy while caching ACL
[zen-stable.git]
/
drivers
/
staging
/
bcm
/
Queue.h
blob
e1f1da2bb6d4fec6d163c2b26fb2a88813e6c0fa
1
/*************************************
2
* Queue.h
3
**************************************/
4
#ifndef __QUEUE_H__
5
#define __QUEUE_H__
6
7
8
9
#define ENQUEUEPACKET(_Head, _Tail,_Packet) \
10
do \
11
{ \
12
if (!_Head) { \
13
_Head = _Packet; \
14
} \
15
else { \
16
(_Tail)->next = _Packet; \
17
} \
18
(_Packet)->next = NULL; \
19
_Tail = _Packet; \
20
}while(0)
21
#define DEQUEUEPACKET(Head, Tail ) \
22
do \
23
{ if(Head) \
24
{ \
25
if (!Head->next) { \
26
Tail = NULL; \
27
} \
28
Head = Head->next; \
29
} \
30
}while(0)
31
#endif
//__QUEUE_H__