Removed duplicate code in predicates.

This commit is contained in:
Tobias Reinhard 2022-12-13 10:42:38 -05:00
parent 8458220b67
commit 1672d293ab
2 changed files with 7 additions and 42 deletions

View file

@ -932,7 +932,8 @@ static void prvYieldForTask( TCB_t * pxTCB,
@*/
{
//@ open taskISRLockInv_p();
//@ assert( integer_((void*) &uxTopReadyPriority, sizeof(UBaseType_t), false, ?gTopReadyPriority0) );
//@ open _taskISRLockInv_p(?gTopReadyPriority0);
//@ assert( integer_((void*) &uxTopReadyPriority, sizeof(UBaseType_t), false, gTopReadyPriority0) );
//@ assert( gTopReadyPriority0 == uxTopReadyPriority);
UBaseType_t uxCurrentPriority = uxTopReadyPriority;
BaseType_t xTaskScheduled = pdFALSE;
@ -1390,6 +1391,7 @@ static void prvYieldForTask( TCB_t * pxTCB,
// @ append_take_nth_drop(uxCurrentPriority, gOwnerLists);
// @ close readyLists_p(gCellLists2, gOwnerLists2);
//@ close _taskISRLockInv_p(_);
//@ close taskISRLockInv_p();
return pdFALSE;
}
@ -1508,7 +1510,6 @@ static void prvYieldForTask( TCB_t * pxTCB,
#endif /* if ( configUSE_CORE_AFFINITY == 1 ) */
#endif /* if ( configNUM_CORES > 1 ) */
//@ open _taskISRLockInv_p(_);
//@ close taskISRLockInv_p();
return pdTRUE;
}
@ -4442,11 +4443,13 @@ void vTaskSwitchContext( BaseType_t xCoreID )
#endif /* VERIFAST */
//@ open taskISRLockInv_p();
//@ open _taskISRLockInv_p(_);
if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
{
/* The scheduler is currently suspended - do not allow a context
* switch. */
xYieldPendings[ xCoreID ] = pdTRUE;
//@ close _taskISRLockInv_p(_);
//@ close taskISRLockInv_p();
}
else
@ -4494,6 +4497,7 @@ void vTaskSwitchContext( BaseType_t xCoreID )
/* Select a new task to run using either the generic C or port
* optimised asm code. */
//@ close _taskISRLockInv_p(_);
//@ close taskISRLockInv_p();
( void ) prvSelectHighestPriorityTask( xCoreID );
traceTASK_SWITCHED_IN();