mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Minor tidying up of IntQueue.c to prevent compiler warnings. No functional difference.
This commit is contained in:
parent
5c75dd907e
commit
50b4b6619d
|
@ -172,7 +172,7 @@ static unsigned portBASE_TYPE uxHighPriorityLoops1 = 0, uxHighPriorityLoops2 = 0
|
||||||
/* Any unexpected behaviour sets xErrorStatus to fail and log the line that
|
/* Any unexpected behaviour sets xErrorStatus to fail and log the line that
|
||||||
caused the error in xErrorLine. */
|
caused the error in xErrorLine. */
|
||||||
static portBASE_TYPE xErrorStatus = pdPASS;
|
static portBASE_TYPE xErrorStatus = pdPASS;
|
||||||
static unsigned portBASE_TYPE xErrorLine = ( unsigned portBASE_TYPE ) 0;
|
static volatile unsigned portBASE_TYPE xErrorLine = ( unsigned portBASE_TYPE ) 0;
|
||||||
|
|
||||||
/* Used for sequencing between tasks. */
|
/* Used for sequencing between tasks. */
|
||||||
static portBASE_TYPE xWasSuspended = pdFALSE;
|
static portBASE_TYPE xWasSuspended = pdFALSE;
|
||||||
|
@ -392,14 +392,13 @@ unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2, uxErrorCount1 = 0, uxErrorC
|
||||||
static void prvLowerPriorityNormallyEmptyTask( void *pvParameters )
|
static void prvLowerPriorityNormallyEmptyTask( void *pvParameters )
|
||||||
{
|
{
|
||||||
unsigned portBASE_TYPE uxValue, uxRxed;
|
unsigned portBASE_TYPE uxValue, uxRxed;
|
||||||
portBASE_TYPE xQueueStatus;
|
|
||||||
|
|
||||||
/* The parameters are not being used so avoid compiler warnings. */
|
/* The parameters are not being used so avoid compiler warnings. */
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
if( ( xQueueStatus = xQueueReceive( xNormallyEmptyQueue, &uxRxed, intqONE_TICK_DELAY ) ) != errQUEUE_EMPTY )
|
if( xQueueReceive( xNormallyEmptyQueue, &uxRxed, intqONE_TICK_DELAY ) != errQUEUE_EMPTY )
|
||||||
{
|
{
|
||||||
/* We should only obtain a value when the high priority task is
|
/* We should only obtain a value when the high priority task is
|
||||||
suspended. */
|
suspended. */
|
||||||
|
@ -441,7 +440,6 @@ portBASE_TYPE xQueueStatus;
|
||||||
static void prv1stHigherPriorityNormallyFullTask( void *pvParameters )
|
static void prv1stHigherPriorityNormallyFullTask( void *pvParameters )
|
||||||
{
|
{
|
||||||
unsigned portBASE_TYPE uxValueToTx, ux;
|
unsigned portBASE_TYPE uxValueToTx, ux;
|
||||||
portBASE_TYPE xQueueStatus;
|
|
||||||
|
|
||||||
/* The parameters are not being used so avoid compiler warnings. */
|
/* The parameters are not being used so avoid compiler warnings. */
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
@ -469,7 +467,7 @@ portBASE_TYPE xQueueStatus;
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
|
||||||
if( ( xQueueStatus = xQueueSend( xNormallyFullQueue, &uxValueToTx, intqSHORT_DELAY ) ) != pdPASS )
|
if( xQueueSend( xNormallyFullQueue, &uxValueToTx, intqSHORT_DELAY ) != pdPASS )
|
||||||
{
|
{
|
||||||
/* intqHIGH_PRIORITY_TASK2 is never suspended so we would not
|
/* intqHIGH_PRIORITY_TASK2 is never suspended so we would not
|
||||||
expect it to ever time out. */
|
expect it to ever time out. */
|
||||||
|
@ -531,7 +529,6 @@ portBASE_TYPE xQueueStatus;
|
||||||
static void prv2ndHigherPriorityNormallyFullTask( void *pvParameters )
|
static void prv2ndHigherPriorityNormallyFullTask( void *pvParameters )
|
||||||
{
|
{
|
||||||
unsigned portBASE_TYPE uxValueToTx, ux;
|
unsigned portBASE_TYPE uxValueToTx, ux;
|
||||||
portBASE_TYPE xQueueStatus;
|
|
||||||
|
|
||||||
/* The parameters are not being used so avoid compiler warnings. */
|
/* The parameters are not being used so avoid compiler warnings. */
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
@ -559,7 +556,7 @@ portBASE_TYPE xQueueStatus;
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
|
||||||
if( ( xQueueStatus = xQueueSend( xNormallyFullQueue, &uxValueToTx, intqSHORT_DELAY ) ) != pdPASS )
|
if( xQueueSend( xNormallyFullQueue, &uxValueToTx, intqSHORT_DELAY ) != pdPASS )
|
||||||
{
|
{
|
||||||
if( xWasSuspended != pdTRUE )
|
if( xWasSuspended != pdTRUE )
|
||||||
{
|
{
|
||||||
|
@ -578,14 +575,13 @@ portBASE_TYPE xQueueStatus;
|
||||||
static void prvLowerPriorityNormallyFullTask( void *pvParameters )
|
static void prvLowerPriorityNormallyFullTask( void *pvParameters )
|
||||||
{
|
{
|
||||||
unsigned portBASE_TYPE uxValue, uxTxed = 9999;
|
unsigned portBASE_TYPE uxValue, uxTxed = 9999;
|
||||||
portBASE_TYPE xQueueStatus;
|
|
||||||
|
|
||||||
/* The parameters are not being used so avoid compiler warnings. */
|
/* The parameters are not being used so avoid compiler warnings. */
|
||||||
( void ) pvParameters;
|
( void ) pvParameters;
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
if( ( xQueueStatus = xQueueSend( xNormallyFullQueue, &uxTxed, intqONE_TICK_DELAY ) ) != errQUEUE_FULL )
|
if( xQueueSend( xNormallyFullQueue, &uxTxed, intqONE_TICK_DELAY ) != errQUEUE_FULL )
|
||||||
{
|
{
|
||||||
/* We would only expect to succeed when the higher priority task
|
/* We would only expect to succeed when the higher priority task
|
||||||
is suspended. */
|
is suspended. */
|
||||||
|
|
Loading…
Reference in a new issue