mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-11 14:15:12 -05:00
Rewrote side-effectful assertion such that VeriFast can process it.
This commit is contained in:
parent
7e75d7aa8f
commit
63d8c5afa8
1 changed files with 9 additions and 1 deletions
10
tasks.c
10
tasks.c
|
|
@ -4173,7 +4173,15 @@ void vTaskSwitchContext( BaseType_t xCoreID )
|
|||
{
|
||||
/* vTaskSwitchContext() must never be called from within a critical section.
|
||||
* This is not necessarily true for vanilla FreeRTOS, but it is for this SMP port. */
|
||||
configASSERT( pxCurrentTCB->uxCriticalNesting == 0 );
|
||||
#ifdef VERIFAST
|
||||
/* Reason for rewrite: VeriFast cannot handle non-pure assertions. */
|
||||
{
|
||||
UBaseType_t nesting = pxCurrentTCB->uxCriticalNesting;
|
||||
configASSERT( nesting == 0 );
|
||||
}
|
||||
#else
|
||||
configASSERT( pxCurrentTCB->uxCriticalNesting == 0 );
|
||||
#endif /* VERIFAST */
|
||||
|
||||
if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue