aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcm570x_queue.h
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /drivers/bcm570x_queue.h
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
downloadu-boot-midas-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.gz
u-boot-midas-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.bz2
u-boot-midas-8bde7f776c77b343aca29b8c7b58464d915ac245.zip
* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'drivers/bcm570x_queue.h')
-rw-r--r--drivers/bcm570x_queue.h40
1 files changed, 14 insertions, 26 deletions
diff --git a/drivers/bcm570x_queue.h b/drivers/bcm570x_queue.h
index bc32ad70f2..336b3caa4a 100644
--- a/drivers/bcm570x_queue.h
+++ b/drivers/bcm570x_queue.h
@@ -103,14 +103,13 @@ typedef struct {
/* Declare queue type macro. */
#define DECLARE_QUEUE_TYPE(_QUEUE_TYPE, _QUEUE_SIZE) \
- \
+ \
typedef struct { \
- QQ_CONTAINER Container; \
- PQQ_ENTRY EntryBuffer[_QUEUE_SIZE]; \
+ QQ_CONTAINER Container; \
+ PQQ_ENTRY EntryBuffer[_QUEUE_SIZE]; \
} _QUEUE_TYPE, *P##_QUEUE_TYPE
-
/******************************************************************************/
/* Compilation switches. */
/******************************************************************************/
@@ -144,7 +143,6 @@ unsigned int QueueSize) {
} /* QQ_InitQueue */
-
/******************************************************************************/
/* Description: */
/* */
@@ -161,7 +159,6 @@ PQQ_CONTAINER pQueue) {
} /* QQ_Full */
-
/******************************************************************************/
/* Description: */
/* */
@@ -174,7 +171,6 @@ PQQ_CONTAINER pQueue) {
} /* QQ_Empty */
-
/******************************************************************************/
/* Description: */
/* */
@@ -187,7 +183,6 @@ PQQ_CONTAINER pQueue) {
} /* QQ_GetSize */
-
/******************************************************************************/
/* Description: */
/* */
@@ -200,7 +195,6 @@ PQQ_CONTAINER pQueue) {
} /* QQ_GetEntryCnt */
-
/******************************************************************************/
/* Description: */
/* */
@@ -218,7 +212,7 @@ PQQ_ENTRY pEntry) {
#if !defined(QQ_NO_OVERFLOW_CHECK)
if(Head == pQueue->Tail) {
- return 0;
+ return 0;
} /* if */
#endif /* QQ_NO_OVERFLOW_CHECK */
@@ -231,7 +225,6 @@ PQQ_ENTRY pEntry) {
} /* QQ_PushHead */
-
/******************************************************************************/
/* Description: */
/* */
@@ -247,13 +240,13 @@ PQQ_ENTRY pEntry) {
Tail = pQueue->Tail;
if(Tail == 0) {
- Tail = pQueue->Size;
+ Tail = pQueue->Size;
} /* if */
Tail--;
#if !defined(QQ_NO_OVERFLOW_CHECK)
if(Tail == pQueue->Head) {
- return 0;
+ return 0;
} /* if */
#endif /* QQ_NO_OVERFLOW_CHECK */
@@ -266,7 +259,6 @@ PQQ_ENTRY pEntry) {
} /* QQ_PushTail */
-
/******************************************************************************/
/* Description: */
/* */
@@ -282,12 +274,12 @@ PQQ_CONTAINER pQueue) {
#if !defined(QQ_NO_UNDERFLOW_CHECK)
if(Head == pQueue->Tail) {
- return (PQQ_ENTRY) 0;
+ return (PQQ_ENTRY) 0;
} /* if */
#endif /* QQ_NO_UNDERFLOW_CHECK */
if(Head == 0) {
- Head = pQueue->Size;
+ Head = pQueue->Size;
} /* if */
Head--;
@@ -304,7 +296,6 @@ PQQ_CONTAINER pQueue) {
} /* QQ_PopHead */
-
/******************************************************************************/
/* Description: */
/* */
@@ -320,7 +311,7 @@ PQQ_CONTAINER pQueue) {
#if !defined(QQ_NO_UNDERFLOW_CHECK)
if(Tail == pQueue->Head) {
- return (PQQ_ENTRY) 0;
+ return (PQQ_ENTRY) 0;
} /* if */
#endif /* QQ_NO_UNDERFLOW_CHECK */
@@ -337,7 +328,6 @@ PQQ_CONTAINER pQueue) {
} /* QQ_PopTail */
-
/******************************************************************************/
/* Description: */
/* */
@@ -350,16 +340,16 @@ QQ_GetHead(
{
if(Idx >= atomic_read(&pQueue->EntryCnt))
{
- return (PQQ_ENTRY) 0;
+ return (PQQ_ENTRY) 0;
}
if(pQueue->Head > Idx)
{
- Idx = pQueue->Head - Idx;
+ Idx = pQueue->Head - Idx;
}
else
{
- Idx = pQueue->Size - (Idx - pQueue->Head);
+ Idx = pQueue->Size - (Idx - pQueue->Head);
}
Idx--;
@@ -367,7 +357,6 @@ QQ_GetHead(
}
-
/******************************************************************************/
/* Description: */
/* */
@@ -380,13 +369,13 @@ QQ_GetTail(
{
if(Idx >= atomic_read(&pQueue->EntryCnt))
{
- return (PQQ_ENTRY) 0;
+ return (PQQ_ENTRY) 0;
}
Idx += pQueue->Tail;
if(Idx >= pQueue->Size)
{
- Idx = Idx - pQueue->Size;
+ Idx = Idx - pQueue->Size;
}
return pQueue->Array[Idx];
@@ -395,5 +384,4 @@ QQ_GetTail(
#endif /* QQ_USE_MACROS */
-
#endif /* QUEUE_H */