mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-11 06:05:18 -05:00
Move temp variable declarations to top of functions
This commit is contained in:
parent
f97dc8b20f
commit
86cf5f32f2
2 changed files with 8 additions and 4 deletions
|
|
@ -316,6 +316,7 @@ typedef struct xLIST
|
|||
/* The list item knows which list it is in. Obtain the list from the list \
|
||||
* item. */ \
|
||||
List_t * const pxList = ( pxItemToRemove )->pxContainer; \
|
||||
UBaseType_t uxNumberOfItems; \
|
||||
\
|
||||
( pxItemToRemove )->pxNext->pxPrevious = ( pxItemToRemove )->pxPrevious; \
|
||||
( pxItemToRemove )->pxPrevious->pxNext = ( pxItemToRemove )->pxNext; \
|
||||
|
|
@ -326,7 +327,7 @@ typedef struct xLIST
|
|||
} \
|
||||
\
|
||||
( pxItemToRemove )->pxContainer = NULL; \
|
||||
UBaseType_t uxNumberOfItems = ( pxList->uxNumberOfItems ); \
|
||||
uxNumberOfItems = ( pxList->uxNumberOfItems ); \
|
||||
uxNumberOfItems--; \
|
||||
( pxList->uxNumberOfItems ) = uxNumberOfItems; \
|
||||
} while( 0 )
|
||||
|
|
@ -356,6 +357,7 @@ typedef struct xLIST
|
|||
#define listINSERT_END( pxList, pxNewListItem ) \
|
||||
do { \
|
||||
ListItem_t * const pxIndex = ( pxList )->pxIndex; \
|
||||
UBaseType_t uxNumberOfitems; \
|
||||
\
|
||||
/* Only effective when configASSERT() is also defined, these tests may catch \
|
||||
* the list data structures being overwritten in memory. They will not catch \
|
||||
|
|
@ -375,7 +377,7 @@ typedef struct xLIST
|
|||
/* Remember which list the item is in. */ \
|
||||
( pxNewListItem )->pxContainer = ( pxList ); \
|
||||
\
|
||||
UBaseType_t uxNumberOfItems = ( ( pxList )->uxNumberOfItems ); \
|
||||
uxNumberOfItems = ( ( pxList )->uxNumberOfItems ); \
|
||||
uxNumberOfItems++; \
|
||||
( ( pxList )->uxNumberOfItems ) = uxNumberOfItems; \
|
||||
} while( 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue