Fix compiler warnings in xcore ports and tasks.c

This commit is contained in:
Michael Bruno 2021-01-20 12:01:22 -05:00
parent b8fe3cf1a0
commit 625f4f66b0
3 changed files with 4 additions and 15 deletions

View file

@ -161,12 +161,7 @@ void vTaskExitCritical(void);
* in ISRs. Effectively this call just grabs the kernel lock * in ISRs. Effectively this call just grabs the kernel lock
* when called from an ISR. * when called from an ISR.
*/ */
static inline uint32_t portSET_INTERRUPT_MASK_FROM_ISR( void ) #define portSET_INTERRUPT_MASK_FROM_ISR() (vTaskEnterCritical(), 0)
{
vTaskEnterCritical();
return 0;
}
#define portSET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
/* /*
* vTaskExitCritical() has been modified to be safe to use * vTaskExitCritical() has been modified to be safe to use
@ -176,7 +171,7 @@ static inline uint32_t portSET_INTERRUPT_MASK_FROM_ISR( void )
* were previously disabled. Thus the previous state in x is * were previously disabled. Thus the previous state in x is
* unused. * unused.
*/ */
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vTaskExitCritical() #define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) (vTaskExitCritical(), (void) x)
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

View file

@ -161,12 +161,7 @@ void vTaskExitCritical(void);
* in ISRs. Effectively this call just grabs the kernel lock * in ISRs. Effectively this call just grabs the kernel lock
* when called from an ISR. * when called from an ISR.
*/ */
static inline uint32_t portSET_INTERRUPT_MASK_FROM_ISR( void ) #define portSET_INTERRUPT_MASK_FROM_ISR() (vTaskEnterCritical(), 0)
{
vTaskEnterCritical();
return 0;
}
#define portSET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
/* /*
* vTaskExitCritical() has been modified to be safe to use * vTaskExitCritical() has been modified to be safe to use
@ -176,7 +171,7 @@ static inline uint32_t portSET_INTERRUPT_MASK_FROM_ISR( void )
* were previously disabled. Thus the previous state in x is * were previously disabled. Thus the previous state in x is
* unused. * unused.
*/ */
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vTaskExitCritical() #define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) (vTaskExitCritical(), (void) x)
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

View file

@ -2277,7 +2277,6 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
void vTaskPreemptionDisable( const TaskHandle_t xTask ) void vTaskPreemptionDisable( const TaskHandle_t xTask )
{ {
TCB_t * pxTCB; TCB_t * pxTCB;
BaseType_t xCoreID;
taskENTER_CRITICAL(); taskENTER_CRITICAL();
{ {