Allow mutex type semaphores to be given from an interrupt (not a normal thing to do - use a binary semaphore!).

Allow FreeRTOS+CLI commands to have spaces at the end without it being taken as a parameter.
pull/4/head
Richard Barry 13 years ago
parent c0de8c984c
commit 48a307ff5f

@ -253,6 +253,11 @@ const int8_t *pcReturn = NULL;
pcCommandString++; pcCommandString++;
} }
if( *pxParameterStringLength == 0 )
{
pcReturn = NULL;
}
break; break;
} }
} }

@ -874,7 +874,9 @@ xTimeOutType xTimeOut;
if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
{ {
portENTER_CRITICAL(); portENTER_CRITICAL();
{
vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder ); vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder );
}
portEXIT_CRITICAL(); portEXIT_CRITICAL();
} }
} }

@ -2382,8 +2382,10 @@ tskTCB *pxNewTCB;
{ {
tskTCB * const pxTCB = ( tskTCB * ) pxMutexHolder; tskTCB * const pxTCB = ( tskTCB * ) pxMutexHolder;
configASSERT( pxMutexHolder ); /* If the mutex was given back by an interrupt while the queue was
locked then the mutex holder might now be NULL. */
if( pxMutexHolder != NULL )
{
if( pxTCB->uxPriority < pxCurrentTCB->uxPriority ) if( pxTCB->uxPriority < pxCurrentTCB->uxPriority )
{ {
/* Adjust the mutex holder state to account for its new priority. */ /* Adjust the mutex holder state to account for its new priority. */
@ -2408,6 +2410,7 @@ tskTCB *pxNewTCB;
traceTASK_PRIORITY_INHERIT( pxTCB, pxCurrentTCB->uxPriority ); traceTASK_PRIORITY_INHERIT( pxTCB, pxCurrentTCB->uxPriority );
} }
} }
}
#endif #endif
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

Loading…
Cancel
Save