*----------------------------------------------------------*/\r
\r
/* Constants used with the cRxLock and cTxLock structure members. */\r
*----------------------------------------------------------*/\r
\r
/* Constants used with the cRxLock and cTxLock structure members. */\r
-#define queueUNLOCKED ( ( signed portBASE_TYPE ) -1 )\r
-#define queueLOCKED_UNMODIFIED ( ( signed portBASE_TYPE ) 0 )\r
+#define queueUNLOCKED ( ( signed portBASE_TYPE ) -1 )\r
+#define queueLOCKED_UNMODIFIED ( ( signed portBASE_TYPE ) 0 )\r
-#define queueERRONEOUS_UNBLOCK ( -1 )\r
+#define queueERRONEOUS_UNBLOCK ( -1 )\r
\r
/* For internal use only. */\r
\r
/* For internal use only. */\r
-#define queueSEND_TO_BACK ( 0 )\r
-#define queueSEND_TO_FRONT ( 1 )\r
+#define queueSEND_TO_BACK ( 0 )\r
+#define queueSEND_TO_FRONT ( 1 )\r
\r
/* Effectively make a union out of the xQUEUE structure. */\r
\r
/* Effectively make a union out of the xQUEUE structure. */\r
-#define pxMutexHolder pcTail\r
-#define uxQueueType pcHead\r
-#define uxRecursiveCallCount pcReadFrom\r
-#define queueQUEUE_IS_MUTEX NULL\r
+#define pxMutexHolder pcTail\r
+#define uxQueueType pcHead\r
+#define uxRecursiveCallCount pcReadFrom\r
+#define queueQUEUE_IS_MUTEX NULL\r
\r
/* Semaphores do not actually store or copy data, so have an items size of\r
zero. */\r
\r
/* Semaphores do not actually store or copy data, so have an items size of\r
zero. */\r
- taskEXIT_CRITICAL(); \r
\r
/* Interrupts and other tasks can send to and receive from the queue\r
now the critical section has been exited. */\r
\r
/* Interrupts and other tasks can send to and receive from the queue\r
now the critical section has been exited. */\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
if( prvIsQueueFull( pxQueue ) )\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
if( prvIsQueueFull( pxQueue ) )\r
traceBLOCKING_ON_QUEUE_SEND( pxQueue );\r
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );\r
\r
traceBLOCKING_ON_QUEUE_SEND( pxQueue );\r
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );\r
\r
{\r
/* Try again. */\r
prvUnlockQueue( pxQueue );\r
{\r
/* Try again. */\r
prvUnlockQueue( pxQueue );\r
- ( void ) xTaskResumeAll(); \r
+ ( void ) xTaskResumeAll();\r
- taskEXIT_CRITICAL(); \r
\r
taskENTER_CRITICAL();\r
{\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
if( prvIsQueueFull( pxQueue ) )\r
\r
taskENTER_CRITICAL();\r
{\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
if( prvIsQueueFull( pxQueue ) )\r
traceBLOCKING_ON_QUEUE_SEND( pxQueue );\r
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );\r
taskYIELD();\r
traceBLOCKING_ON_QUEUE_SEND( pxQueue );\r
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );\r
taskYIELD();\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
if( prvIsQueueEmpty( pxQueue ) )\r
if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )\r
{\r
if( prvIsQueueEmpty( pxQueue ) )\r
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );\r
\r
#if ( configUSE_MUTEXES == 1 )\r
traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue );\r
\r
#if ( configUSE_MUTEXES == 1 )\r
taskENTER_CRITICAL();\r
{\r
/* Is there data in the queue now? To be running we must be\r
taskENTER_CRITICAL();\r
{\r
/* Is there data in the queue now? To be running we must be\r
- the highest priority task wanting to access the queue. */ \r
+ the highest priority task wanting to access the queue. */\r
if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )\r
{\r
/* Remember our read position in case we are just peeking. */\r
if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )\r
{\r
/* Remember our read position in case we are just peeking. */\r
if( xTicksToWait == ( portTickType ) 0 )\r
{\r
/* The queue was empty and no block time is specified (or\r
if( xTicksToWait == ( portTickType ) 0 )\r
{\r
/* The queue was empty and no block time is specified (or\r
- the block time has expired) so leave now. */ \r
+ the block time has expired) so leave now. */\r
taskEXIT_CRITICAL();\r
traceQUEUE_RECEIVE_FAILED( pxQueue );\r
return errQUEUE_EMPTY;\r
taskEXIT_CRITICAL();\r
traceQUEUE_RECEIVE_FAILED( pxQueue );\r
return errQUEUE_EMPTY;\r
else if( xEntryTimeSet == pdFALSE )\r
{\r
/* The queue was empty and a block time was specified so\r
else if( xEntryTimeSet == pdFALSE )\r
{\r
/* The queue was empty and a block time was specified so\r
- configure the timeout structure. */ \r
+ configure the timeout structure. */\r
vTaskSetTimeOutState( &xTimeOut );\r
xEntryTimeSet = pdTRUE;\r
}\r
vTaskSetTimeOutState( &xTimeOut );\r
xEntryTimeSet = pdTRUE;\r
}\r