Skip to content

Commit

Permalink
Remove access check from ISR function (#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
kar-rahul-aws authored Aug 21, 2024
1 parent 18a168b commit 0b904a5
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions portable/Common/mpu_wrappers_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3838,27 +3838,16 @@
BaseType_t xReturn = pdFALSE;
TimerHandle_t xInternalTimerHandle = NULL;
int32_t lIndex;
BaseType_t xIsHigherPriorityTaskWokenWriteable = pdFALSE;

if( pxHigherPriorityTaskWoken != NULL )
{
xIsHigherPriorityTaskWokenWriteable = xPortIsAuthorizedToAccessBuffer( pxHigherPriorityTaskWoken,
sizeof( BaseType_t ),
tskMPU_WRITE_PERMISSION );
}
lIndex = ( int32_t ) xTimer;

if( ( pxHigherPriorityTaskWoken == NULL ) || ( xIsHigherPriorityTaskWokenWriteable == pdTRUE ) )
if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
lIndex = ( int32_t ) xTimer;
xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );

if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
if( xInternalTimerHandle != NULL )
{
xInternalTimerHandle = MPU_GetTimerHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );

if( xInternalTimerHandle != NULL )
{
xReturn = xTimerGenericCommandFromISR( xInternalTimerHandle, xCommandID, xOptionalValue, pxHigherPriorityTaskWoken, xTicksToWait );
}
xReturn = xTimerGenericCommandFromISR( xInternalTimerHandle, xCommandID, xOptionalValue, pxHigherPriorityTaskWoken, xTicksToWait );
}
}

Expand Down

0 comments on commit 0b904a5

Please sign in to comment.