Add trace macros into the event groups implementation.

Add a task pre-delete hook to allow the insertion of any port specific clean up when a task is deleted.
Increase use of 'const' qualifiers.
Add vPortCloseRunningThread() into the Win32 port layer to attempt to allow Windows threads to be closed more gracefully when a task deletes itself.
This commit is contained in:
Richard Barry 2013-12-12 10:19:07 +00:00
parent 0416289066
commit 6b3393b4b6
6 changed files with 129 additions and 16 deletions

View file

@ -685,6 +685,13 @@ tskTCB * pxNewTCB;
if( pxTCB == pxCurrentTCB )
{
configASSERT( uxSchedulerSuspended == 0 );
/* The pre-delete hook is primarily for the Windows simulator,
in which Windows specific clean up operations are performed,
after which it is not possible to yield away from this task -
hence xYieldPending is used to latch that a context switch is
required. */
portPRE_DELETE_HOOK( pxTCB, &xYieldPending );
portYIELD_WITHIN_API();
}
}
@ -1896,7 +1903,7 @@ void vTaskSwitchContext( void )
}
/*-----------------------------------------------------------*/
void vTaskPlaceOnEventList( xList * const pxEventList, portTickType xTicksToWait )
void vTaskPlaceOnEventList( xList * const pxEventList, const portTickType xTicksToWait )
{
portTickType xTimeToWake;
@ -1948,7 +1955,7 @@ portTickType xTimeToWake;
}
/*-----------------------------------------------------------*/
void vTaskPlaceOnUnorderedEventList( xList * pxEventList, portTickType xItemValue, portTickType xTicksToWait )
void vTaskPlaceOnUnorderedEventList( xList * pxEventList, portTickType xItemValue, const portTickType xTicksToWait )
{
portTickType xTimeToWake;