mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-11 08:37:44 -04:00
Fix compiler warning in timers.c/h that are only seen when the file is compiled on 8 bit devices.
Update example source code in timers.h so the parameter names match those in timers.c. Fix "known issue" bug in xTaskResumeFromISR() (which was missing a critical section).
This commit is contained in:
parent
562eedc434
commit
eb8f02358e
3 changed files with 25 additions and 21 deletions
|
@ -1048,29 +1048,34 @@ tskTCB * pxNewTCB;
|
|||
{
|
||||
portBASE_TYPE xYieldRequired = pdFALSE;
|
||||
tskTCB *pxTCB;
|
||||
unsigned portBASE_TYPE uxSavedInterruptStatus;
|
||||
|
||||
configASSERT( pxTaskToResume );
|
||||
|
||||
pxTCB = ( tskTCB * ) pxTaskToResume;
|
||||
|
||||
if( xTaskIsTaskSuspended( pxTCB ) == pdTRUE )
|
||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
{
|
||||
traceTASK_RESUME_FROM_ISR( pxTCB );
|
||||
if( xTaskIsTaskSuspended( pxTCB ) == pdTRUE )
|
||||
{
|
||||
traceTASK_RESUME_FROM_ISR( pxTCB );
|
||||
|
||||
if( uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdFALSE )
|
||||
{
|
||||
xYieldRequired = ( pxTCB->uxPriority >= pxCurrentTCB->uxPriority );
|
||||
vListRemove( &( pxTCB->xGenericListItem ) );
|
||||
prvAddTaskToReadyQueue( pxTCB );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We cannot access the delayed or ready lists, so will hold this
|
||||
task pending until the scheduler is resumed, at which point a
|
||||
yield will be performed if necessary. */
|
||||
vListInsertEnd( ( xList * ) &( xPendingReadyList ), &( pxTCB->xEventListItem ) );
|
||||
if( uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdFALSE )
|
||||
{
|
||||
xYieldRequired = ( pxTCB->uxPriority >= pxCurrentTCB->uxPriority );
|
||||
vListRemove( &( pxTCB->xGenericListItem ) );
|
||||
prvAddTaskToReadyQueue( pxTCB );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We cannot access the delayed or ready lists, so will hold this
|
||||
task pending until the scheduler is resumed, at which point a
|
||||
yield will be performed if necessary. */
|
||||
vListInsertEnd( ( xList * ) &( xPendingReadyList ), &( pxTCB->xEventListItem ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
|
||||
|
||||
return xYieldRequired;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue