{\r
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )\r
{\r
- portENTER_CRITICAL();\r
- vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder );\r
- portEXIT_CRITICAL();\r
+ vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder );\r
}\r
}\r
#endif\r
signed portBASE_TYPE xQueueGenericSendFromISR( xQueueHandle pxQueue, const void * const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition )\r
{\r
signed portBASE_TYPE xReturn;\r
+unsigned portBASE_TYPE uxSavedInterruptStatus;\r
\r
/* Similar to xQueueGenericSend, except we don't block if there is no room\r
in the queue. Also we don't directly wake a task that was blocked on a\r
queue read, instead we return a flag to say whether a context switch is\r
required or not (i.e. has a task with a higher priority than us been woken\r
by this post). */\r
- portSET_INTERRUPT_MASK_FROM_ISR();\r
+ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();\r
{\r
if( pxQueue->uxMessagesWaiting < pxQueue->uxLength )\r
{\r
xReturn = errQUEUE_FULL;\r
}\r
}\r
- portCLEAR_INTERRUPT_MASK_FROM_ISR();\r
+ portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );\r
\r
return xReturn;\r
}\r
signed portBASE_TYPE xQueueReceiveFromISR( xQueueHandle pxQueue, void * const pvBuffer, signed portBASE_TYPE *pxTaskWoken )\r
{\r
signed portBASE_TYPE xReturn;\r
+unsigned portBASE_TYPE uxSavedInterruptStatus;\r
\r
- portSET_INTERRUPT_MASK_FROM_ISR();\r
+ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();\r
{\r
/* We cannot block from an ISR, so check there is data available. */\r
if( pxQueue->uxMessagesWaiting > ( unsigned portBASE_TYPE ) 0 )\r
traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue );\r
}\r
}\r
- portCLEAR_INTERRUPT_MASK_FROM_ISR();\r
+ portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );\r
\r
return xReturn;\r
}\r