Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux/fpc-iii.git] / drivers / staging / bcm / Queue.h
blobe1f1da2bb6d4fec6d163c2b26fb2a88813e6c0fa
1 /*************************************
2 * Queue.h
3 **************************************/
4 #ifndef __QUEUE_H__
5 #define __QUEUE_H__
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__