\r
#include "FreeRTOS.h"\r
#include "task.h"\r
-#include "croutine.h"\r
+\r
+#if ( configUSE_CO_ROUTINES == 1 )\r
+ #include "croutine.h"\r
+#endif\r
\r
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE\r
\r
\r
/* Semaphores do not actually store or copy data, so have an items size of\r
zero. */\r
-#define queueSEMAPHORE_QUEUE_ITEM_LENGTH ( 0 )\r
-#define queueDONT_BLOCK ( ( portTickType ) 0 )\r
-#define queueMUTEX_GIVE_BLOCK_TIME ( ( portTickType ) 0 )\r
+#define queueSEMAPHORE_QUEUE_ITEM_LENGTH ( ( unsigned portBASE_TYPE ) 0 )\r
+#define queueDONT_BLOCK ( ( portTickType ) 0U )\r
+#define queueMUTEX_GIVE_BLOCK_TIME ( ( portTickType ) 0U )\r
\r
/*\r
* Definition of the queue used by the scheduler.\r
/* Update the timeout state to see if it has expired yet. */\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
- if( prvIsQueueFull( pxQueue ) )\r
+ if( prvIsQueueFull( pxQueue ) != pdFALSE )\r
{\r
traceBLOCKING_ON_QUEUE_SEND( pxQueue );\r
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );\r
task is already in a ready list before it yields - in which\r
case the yield will not cause a context switch unless there\r
is also a higher priority task in the pending ready list. */\r
- if( !xTaskResumeAll() )\r
+ if( xTaskResumeAll() == pdFALSE )\r
{\r
portYIELD_WITHIN_API();\r
}\r
{\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
- if( prvIsQueueFull( pxQueue ) )\r
+ if( prvIsQueueFull( pxQueue ) != pdFALSE )\r
{\r
traceBLOCKING_ON_QUEUE_SEND( pxQueue );\r
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );\r
{\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
- if( prvIsQueueEmpty( pxQueue ) )\r
+ if( prvIsQueueEmpty( pxQueue ) != pdFALSE )\r
{\r
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );\r
\r
/* Update the timeout state to see if it has expired yet. */\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
- if( prvIsQueueEmpty( pxQueue ) )\r
+ if( prvIsQueueEmpty( pxQueue ) != pdFALSE )\r
{\r
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );\r
\r
\r
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );\r
prvUnlockQueue( pxQueue );\r
- if( !xTaskResumeAll() )\r
+ if( xTaskResumeAll() == pdFALSE )\r
{\r
portYIELD_WITHIN_API();\r
}\r
between the check to see if the queue is full and blocking on the queue. */\r
portDISABLE_INTERRUPTS();\r
{\r
- if( prvIsQueueFull( pxQueue ) )\r
+ if( prvIsQueueFull( pxQueue ) != pdFALSE )\r
{\r
/* The queue is full - do we want to block or just leave without\r
posting? */\r
\r
/* We only want to wake one co-routine per ISR, so check that a\r
co-routine has not already been woken. */\r
- if( !xCoRoutinePreviouslyWoken )\r
+ if( xCoRoutinePreviouslyWoken == pdFALSE )\r
{\r
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )\r
{\r
--( pxQueue->uxMessagesWaiting );\r
memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->pcReadFrom, ( unsigned ) pxQueue->uxItemSize );\r
\r
- if( !( *pxCoRoutineWoken ) )\r
+ if( ( *pxCoRoutineWoken ) == pdFALSE )\r
{\r
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )\r
{\r
\r
/* See if there is an empty space in the registry. A NULL name denotes\r
a free slot. */\r
- for( ux = ( unsigned portBASE_TYPE ) 0U; ux < configQUEUE_REGISTRY_SIZE; ux++ )\r
+ for( ux = ( unsigned portBASE_TYPE ) 0U; ux < ( unsigned portBASE_TYPE ) configQUEUE_REGISTRY_SIZE; ux++ )\r
{\r
if( xQueueRegistry[ ux ].pcQueueName == NULL )\r
{\r
\r
/* See if the handle of the queue being unregistered in actually in the\r
registry. */\r
- for( ux = ( unsigned portBASE_TYPE ) 0U; ux < configQUEUE_REGISTRY_SIZE; ux++ )\r
+ for( ux = ( unsigned portBASE_TYPE ) 0U; ux < ( unsigned portBASE_TYPE ) configQUEUE_REGISTRY_SIZE; ux++ )\r
{\r
if( xQueueRegistry[ ux ].xHandle == xQueue )\r
{\r