From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- drivers/staging/bcm/Queue.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 drivers/staging/bcm/Queue.h (limited to 'drivers/staging/bcm/Queue.h') diff --git a/drivers/staging/bcm/Queue.h b/drivers/staging/bcm/Queue.h new file mode 100644 index 00000000..e1f1da2b --- /dev/null +++ b/drivers/staging/bcm/Queue.h @@ -0,0 +1,31 @@ +/************************************* +* Queue.h +**************************************/ +#ifndef __QUEUE_H__ +#define __QUEUE_H__ + + + +#define ENQUEUEPACKET(_Head, _Tail,_Packet) \ +do \ +{ \ + if (!_Head) { \ + _Head = _Packet; \ + } \ + else { \ + (_Tail)->next = _Packet; \ + } \ + (_Packet)->next = NULL; \ + _Tail = _Packet; \ +}while(0) +#define DEQUEUEPACKET(Head, Tail ) \ +do \ +{ if(Head) \ + { \ + if (!Head->next) { \ + Tail = NULL; \ + } \ + Head = Head->next; \ + } \ +}while(0) +#endif //__QUEUE_H__ -- cgit v1.3.1