pcRegisteredCommandString = pxCommand->pxCommandLineDefinition->pcCommand;\r
xCommandStringLength = strlen( ( const char * ) pcRegisteredCommandString );\r
\r
- /* To ensure the string lengths match exactly, so as not to pick up \r
+ /* To ensure the string lengths match exactly, so as not to pick up\r
a sub-string of a longer command, check the byte after the expected\r
end of the string is either the end of the string or a space before\r
a parameter. */\r
pcCommandString++;\r
}\r
\r
+ if( *pxParameterStringLength == 0 )\r
+ {\r
+ pcReturn = NULL;\r
+ }\r
+\r
break;\r
}\r
}\r
{\r
tskTCB * const pxTCB = ( tskTCB * ) pxMutexHolder;\r
\r
- configASSERT( pxMutexHolder );\r
-\r
- if( pxTCB->uxPriority < pxCurrentTCB->uxPriority )\r
+ /* If the mutex was given back by an interrupt while the queue was\r
+ locked then the mutex holder might now be NULL. */\r
+ if( pxMutexHolder != NULL )\r
{\r
- /* Adjust the mutex holder state to account for its new priority. */\r
- listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), configMAX_PRIORITIES - ( portTickType ) pxCurrentTCB->uxPriority );\r
-\r
- /* If the task being modified is in the ready state it will need to\r
- be moved in to a new list. */\r
- if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxTCB->uxPriority ] ), &( pxTCB->xGenericListItem ) ) != pdFALSE )\r
+ if( pxTCB->uxPriority < pxCurrentTCB->uxPriority )\r
{\r
- vListRemove( &( pxTCB->xGenericListItem ) );\r
+ /* Adjust the mutex holder state to account for its new priority. */\r
+ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), configMAX_PRIORITIES - ( portTickType ) pxCurrentTCB->uxPriority );\r
\r
- /* Inherit the priority before being moved into the new list. */\r
- pxTCB->uxPriority = pxCurrentTCB->uxPriority;\r
- prvAddTaskToReadyQueue( pxTCB );\r
- }\r
- else\r
- {\r
- /* Just inherit the priority. */\r
- pxTCB->uxPriority = pxCurrentTCB->uxPriority;\r
- }\r
+ /* If the task being modified is in the ready state it will need to\r
+ be moved in to a new list. */\r
+ if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxTCB->uxPriority ] ), &( pxTCB->xGenericListItem ) ) != pdFALSE )\r
+ {\r
+ vListRemove( &( pxTCB->xGenericListItem ) );\r
\r
- traceTASK_PRIORITY_INHERIT( pxTCB, pxCurrentTCB->uxPriority );\r
+ /* Inherit the priority before being moved into the new list. */\r
+ pxTCB->uxPriority = pxCurrentTCB->uxPriority;\r
+ prvAddTaskToReadyQueue( pxTCB );\r
+ }\r
+ else\r
+ {\r
+ /* Just inherit the priority. */\r
+ pxTCB->uxPriority = pxCurrentTCB->uxPriority;\r
+ }\r
+\r
+ traceTASK_PRIORITY_INHERIT( pxTCB, pxCurrentTCB->uxPriority );\r
+ }\r
}\r
}\r
\r