It would be very useful, in my code, to interrogate the size of a Queue in an ISR. Looking at the code I can't see why this would be a problem. Is the below code a valid implementation?
UBaseTypet uxQueueSpacesAvailableFromISR( const QueueHandlet xQueue )
uxReturn = ( ( Queuet * ) xQueue )->uxLength - ( ( Queue_t * ) xQueue )->uxMessagesWaiting;
Can anyone see any potential problems with this? Am I missing something obvious?