From ee70a7815d1b5ec25213b80e960cc7e03e9da13a Mon Sep 17 00:00:00 2001 From: Tobias Reinhard <16916681+tobireinhard@users.noreply.github.com> Date: Thu, 13 Oct 2022 12:52:57 -0400 Subject: [PATCH] Resolved VF parse error. Deleted functions involving inline assembler. --- tasks.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/tasks.c b/tasks.c index 1afc706e4..81ad299e3 100644 --- a/tasks.c +++ b/tasks.c @@ -602,20 +602,31 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ -static BaseType_t prvGetCurrentYieldPending( void ) -{ - BaseType_t xReturn; - UBaseType_t ulState; +#ifndef VERIFAST + /* Reason for rewrite: + * VeriFast cannot handle inline assembler and both `portDISABLE_INTERRUPTS` + * and `portRESTORE_INTERRUPTS` expand to inline assembler instructions. + */ + static BaseType_t prvGetCurrentYieldPending( void ) + { + BaseType_t xReturn; + UBaseType_t ulState; - ulState = portDISABLE_INTERRUPTS(); - xReturn = xYieldPendings[ portGET_CORE_ID() ]; - portRESTORE_INTERRUPTS( ulState ); + ulState = portDISABLE_INTERRUPTS(); + xReturn = xYieldPendings[ portGET_CORE_ID() ]; + portRESTORE_INTERRUPTS( ulState ); - return xReturn; -} + return xReturn; + } +#endif /* VERIFAST */ /*-----------------------------------------------------------*/ +#ifndef VERIFAST + /* Reason for rewrite: + * VeriFast cannot handle inline assembler and `portCHECK_IF_IN_ISR` + * expands to inline assembler. + */ static void prvCheckForRunStateChange( void ) { UBaseType_t uxPrevCriticalNesting; @@ -690,6 +701,7 @@ static void prvCheckForRunStateChange( void ) } } } +#endif /* VERIFAST */ /*-----------------------------------------------------------*/