mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-06-06 12:29:03 -04:00
Fix RP2040 compile warning (#736)
* Fix Pico compile warning -- port layer * Warning resolved for volatile discard task.c (#5) --------- Co-authored-by: Pranjal Chanda <40349163+pranjalchanda08@users.noreply.github.com> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
parent
20300df3c3
commit
dd1b87dae9
13
portable/ThirdParty/GCC/RP2040/port.c
vendored
13
portable/ThirdParty/GCC/RP2040/port.c
vendored
|
@ -493,7 +493,7 @@ void vPortYield( void )
|
||||||
void vPortEnableInterrupts( void )
|
void vPortEnableInterrupts( void )
|
||||||
{
|
{
|
||||||
#if ( configSUPPORT_PICO_SYNC_INTEROP == 1 )
|
#if ( configSUPPORT_PICO_SYNC_INTEROP == 1 )
|
||||||
int xCoreID = portGET_CORE_ID();
|
int xCoreID = ( int ) portGET_CORE_ID();
|
||||||
if( pxYieldSpinLock[xCoreID] )
|
if( pxYieldSpinLock[xCoreID] )
|
||||||
{
|
{
|
||||||
spin_lock_t* const pxTmpLock = pxYieldSpinLock[xCoreID];
|
spin_lock_t* const pxTmpLock = pxYieldSpinLock[xCoreID];
|
||||||
|
@ -530,7 +530,12 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask )
|
||||||
|
|
||||||
void vYieldCore( int xCoreID )
|
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
|
#if portRUNNING_ON_BOTH_CORES
|
||||||
/* Non blocking, will cause interrupt on other core if the queue isn't already full,
|
/* Non blocking, will cause interrupt on other core if the queue isn't already full,
|
||||||
in which case an IRQ must be pending */
|
in which case an IRQ must be pending */
|
||||||
|
@ -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
|
// by the spinlock, we can defer until portENABLE_INTERRUPTS is called which is always called when
|
||||||
// the scheduler is unlocked during this call
|
// the scheduler is unlocked during this call
|
||||||
configASSERT(pxLock->spin_lock);
|
configASSERT(pxLock->spin_lock);
|
||||||
int xCoreID = portGET_CORE_ID();
|
int xCoreID = ( int ) portGET_CORE_ID();
|
||||||
pxYieldSpinLock[xCoreID] = pxLock->spin_lock;
|
pxYieldSpinLock[xCoreID] = pxLock->spin_lock;
|
||||||
ulYieldSpinLockSaveValue[xCoreID] = ulSave;
|
ulYieldSpinLockSaveValue[xCoreID] = ulSave;
|
||||||
xEventGroupWaitBits( xEventGroup, prvGetEventGroupBit(pxLock->spin_lock),
|
xEventGroupWaitBits( xEventGroup, prvGetEventGroupBit(pxLock->spin_lock),
|
||||||
|
@ -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
|
* by the spinlock, we can defer until portENABLE_INTERRUPTS is called which is always called when
|
||||||
* the scheduler is unlocked during this call */
|
* the scheduler is unlocked during this call */
|
||||||
configASSERT(pxLock->spin_lock);
|
configASSERT(pxLock->spin_lock);
|
||||||
int xCoreID = portGET_CORE_ID();
|
int xCoreID = ( int ) portGET_CORE_ID();
|
||||||
pxYieldSpinLock[xCoreID] = pxLock->spin_lock;
|
pxYieldSpinLock[xCoreID] = pxLock->spin_lock;
|
||||||
ulYieldSpinLockSaveValue[xCoreID] = ulSave;
|
ulYieldSpinLockSaveValue[xCoreID] = ulSave;
|
||||||
xEventGroupWaitBits( xEventGroup,
|
xEventGroupWaitBits( xEventGroup,
|
||||||
|
|
2
tasks.c
2
tasks.c
|
@ -5541,7 +5541,7 @@ static void prvCheckTasksWaitingTermination( void )
|
||||||
/* xTask is NULL then get the state of the calling task. */
|
/* xTask is NULL then get the state of the calling task. */
|
||||||
pxTCB = prvGetTCBFromHandle( xTask );
|
pxTCB = prvGetTCBFromHandle( xTask );
|
||||||
|
|
||||||
pxTaskStatus->xHandle = ( TaskHandle_t ) pxTCB;
|
pxTaskStatus->xHandle = pxTCB;
|
||||||
pxTaskStatus->pcTaskName = ( const char * ) &( pxTCB->pcTaskName[ 0 ] );
|
pxTaskStatus->pcTaskName = ( const char * ) &( pxTCB->pcTaskName[ 0 ] );
|
||||||
pxTaskStatus->uxCurrentPriority = pxTCB->uxPriority;
|
pxTaskStatus->uxCurrentPriority = pxTCB->uxPriority;
|
||||||
pxTaskStatus->pxStackBase = pxTCB->pxStack;
|
pxTaskStatus->pxStackBase = pxTCB->pxStack;
|
||||||
|
|
Loading…
Reference in a new issue