Preparing for new release...

Kernel changes:
- Remove an assert that was preventing xQueueSendFromISR() being used to give a mutex from an ISR (mutexes cannot be given using xSemaphoreGiveFromISR()).
- Introduce xTaskNotifyAndQueryFromISR() as the interrupt safe version of xTaskNotifyAndQuery().

Common demo task changes:
- Update IntSemTest.c to prove the theory that it is safe to give a mutex type semaphore from an interrupt using xQueueSendFromISR() instead of xSemaphoreGiveFromISR().
- Update TaskNotify.c to test the new xTaskNotifyAndQuery() from ISR fuction.
This commit is contained in:
Richard Barry 2015-08-01 07:03:32 +00:00
parent 25b911e0bd
commit 4c3722bd76
6 changed files with 129 additions and 62 deletions

View file

@ -1219,9 +1219,11 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
if the item size is not 0. */
configASSERT( pxQueue->uxItemSize == 0 );
/* Normally a mutex would not be given from an interrupt, and doing so is
definitely wrong if there is a mutex holder as priority inheritance makes no
sense for an interrupts, only tasks. */
/* Normally a mutex would not be given from an interrupt, especially if
there is a mutex holder, as priority inheritance makes no sense for an
interrupts, only tasks. However, on occasions when it is wanted to give
a mutex from an interrupt, use xQueueSendFromISR() in place of
xSemaphoreGiveFromISR(). */
configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->pxMutexHolder != NULL ) ) );
/* RTOS ports that support interrupt nesting have the concept of a maximum