Skip to content

Commit

Permalink
Merge branch 'main' into improve_speed_of_split_memory
Browse files Browse the repository at this point in the history
  • Loading branch information
aggarg authored Aug 3, 2023
2 parents cea5ba7 + dd1b87d commit 6939d99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions portable/ThirdParty/GCC/RP2040/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ void vPortYield( void )
void vPortEnableInterrupts( void )
{
#if ( configSUPPORT_PICO_SYNC_INTEROP == 1 )
int xCoreID = portGET_CORE_ID();
int xCoreID = ( int ) portGET_CORE_ID();
if( pxYieldSpinLock[xCoreID] )
{
spin_lock_t* const pxTmpLock = pxYieldSpinLock[xCoreID];
Expand Down Expand Up @@ -530,7 +530,12 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask )

void vYieldCore( int xCoreID )
{
configASSERT(xCoreID != portGET_CORE_ID());
/* Remove warning if configASSERT is not defined.
* xCoreID is not used in this function due to this is a dual-core system. The yielding core must be different from the current core. */
( void ) xCoreID;

configASSERT( xCoreID != ( int ) portGET_CORE_ID() );

#if portRUNNING_ON_BOTH_CORES
/* Non blocking, will cause interrupt on other core if the queue isn't already full,
in which case an IRQ must be pending */
Expand Down Expand Up @@ -1004,7 +1009,7 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void )
// by the spinlock, we can defer until portENABLE_INTERRUPTS is called which is always called when
// the scheduler is unlocked during this call
configASSERT(pxLock->spin_lock);
int xCoreID = portGET_CORE_ID();
int xCoreID = ( int ) portGET_CORE_ID();
pxYieldSpinLock[xCoreID] = pxLock->spin_lock;
ulYieldSpinLockSaveValue[xCoreID] = ulSave;
xEventGroupWaitBits( xEventGroup, prvGetEventGroupBit(pxLock->spin_lock),
Expand Down Expand Up @@ -1076,7 +1081,7 @@ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void )
* by the spinlock, we can defer until portENABLE_INTERRUPTS is called which is always called when
* the scheduler is unlocked during this call */
configASSERT(pxLock->spin_lock);
int xCoreID = portGET_CORE_ID();
int xCoreID = ( int ) portGET_CORE_ID();
pxYieldSpinLock[xCoreID] = pxLock->spin_lock;
ulYieldSpinLockSaveValue[xCoreID] = ulSave;
xEventGroupWaitBits( xEventGroup,
Expand Down
2 changes: 1 addition & 1 deletion tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -5541,7 +5541,7 @@ static void prvCheckTasksWaitingTermination( void )
/* xTask is NULL then get the state of the calling task. */
pxTCB = prvGetTCBFromHandle( xTask );

pxTaskStatus->xHandle = ( TaskHandle_t ) pxTCB;
pxTaskStatus->xHandle = pxTCB;
pxTaskStatus->pcTaskName = ( const char * ) &( pxTCB->pcTaskName[ 0 ] );
pxTaskStatus->uxCurrentPriority = pxTCB->uxPriority;
pxTaskStatus->pxStackBase = pxTCB->pxStack;
Expand Down

0 comments on commit 6939d99

Please sign in to comment.