Skip to content

Commit 13f034e

Browse files
kilograhamgraham sanderson
andauthored
RP2040: Fix compiler warning and comment (#509)
Co-authored-by: graham sanderson <graham.sanderson@raspeberryi.com>
1 parent b3918c7 commit 13f034e

File tree

1 file changed

+5
-3
lines changed
  • portable/ThirdParty/GCC/RP2040

1 file changed

+5
-3
lines changed

portable/ThirdParty/GCC/RP2040/port.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ static void prvTaskExitError( void );
120120
#define pEventGroup (&xStaticEventGroup)
121121
#endif /* configSUPPORT_STATIC_ALLOCATION */
122122
static EventGroupHandle_t xEventGroup;
123-
static EventBits_t uxCrossCoreEventBits;
124-
static spin_lock_t * pxCrossCoreSpinLock;
123+
#if (portRUNNING_ON_BOTH_CORES == 0)
124+
static EventBits_t uxCrossCoreEventBits;
125+
static spin_lock_t * pxCrossCoreSpinLock;
126+
#endif
125127
static spin_lock_t * pxYieldSpinLock[configNUM_CORES];
126128
static uint32_t ulYieldSpinLockSaveValue[configNUM_CORES];
127129
#endif /* configSUPPORT_PICO_SYNC_INTEROP */
@@ -357,7 +359,7 @@ void vPortYield( void )
357359
{
358360
#if ( configSUPPORT_PICO_SYNC_INTEROP == 1 )
359361
/* We are not in an ISR, and pxYieldSpinLock is always dealt with and
360-
* cleared interrupts are re-enabled, so should be NULL */
362+
* cleared when interrupts are re-enabled, so should be NULL */
361363
configASSERT( pxYieldSpinLock[portGET_CORE_ID()] == NULL );
362364
#endif /* configSUPPORT_PICO_SYNC_INTEROP */
363365

0 commit comments

Comments
 (0)