Skip to content

Commit

Permalink
RP2040: Remove incorrect assertion (FreeRTOS#508)
Browse files Browse the repository at this point in the history
After the xEventGroupWaitBits in vProtLockInternalSpinUnlockWithWait there was an assertion about
pxYiledSpinLock being NULL, however when xEventGroupWaitBits returns, IRQs have been re-enabled
and so it is no longer safe to assert on the state which is protected by IRQs being disabled.

Co-authored-by: graham sanderson <graham.sanderson@raspeberryi.com>
  • Loading branch information
kilograham and graham sanderson authored Jun 22, 2022
1 parent d5771a7 commit 90d9204
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions portable/ThirdParty/GCC/RP2040/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,9 +742,6 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void )
ulYieldSpinLockSaveValue = ulSave;
xEventGroupWaitBits( xEventGroup, prvGetEventGroupBit(pxLock->spin_lock),
pdTRUE, pdFALSE, portMAX_DELAY);
/* sanity check that interrupts were disabled, then re-enabled during the call, which will have
* taken care of the yield */
configASSERT( pxYieldSpinLock == NULL);
}
}

Expand Down

0 comments on commit 90d9204

Please sign in to comment.