mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
refactor(freertos): Refactor usage of portBASE_TYPE to BaseType_t
portBASE_TYPE is an internal macro defined by the porting layer. This commit changes all references to BaseType_t which is the official type exposed by FreeRTOS.
This commit is contained in:
@@ -58,8 +58,8 @@ extern "C" {
|
||||
#define portPOINTER_SIZE_TYPE intptr_t
|
||||
|
||||
typedef portSTACK_TYPE StackType_t;
|
||||
typedef long BaseType_t;
|
||||
typedef unsigned long UBaseType_t;
|
||||
typedef portBASE_TYPE BaseType_t;
|
||||
typedef unsigned portBASE_TYPE UBaseType_t;
|
||||
|
||||
typedef unsigned long TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) ULONG_MAX
|
||||
@@ -91,8 +91,8 @@ extern void vPortEnableInterrupts( void );
|
||||
#define portSET_INTERRUPT_MASK() ( vPortDisableInterrupts() )
|
||||
#define portCLEAR_INTERRUPT_MASK() ( vPortEnableInterrupts() )
|
||||
|
||||
extern portBASE_TYPE xPortSetInterruptMask( void );
|
||||
extern void vPortClearInterruptMask( portBASE_TYPE xMask );
|
||||
extern BaseType_t xPortSetInterruptMask( void );
|
||||
extern void vPortClearInterruptMask( BaseType_t xMask );
|
||||
|
||||
extern void vPortEnterCritical( void );
|
||||
extern void vPortExitCritical( void );
|
||||
|
@@ -98,10 +98,10 @@ static pthread_once_t hSigSetupThread = PTHREAD_ONCE_INIT;
|
||||
static sigset_t xAllSignals;
|
||||
static sigset_t xSchedulerOriginalSignalMask;
|
||||
static pthread_t hMainThread = ( pthread_t )NULL;
|
||||
static volatile portBASE_TYPE uxCriticalNesting;
|
||||
static volatile BaseType_t uxCriticalNesting;
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portBASE_TYPE xSchedulerEnd = pdFALSE;
|
||||
static BaseType_t xSchedulerEnd = pdFALSE;
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupSignalsAndSchedulerPolicy( void );
|
||||
@@ -179,7 +179,7 @@ void vPortStartFirstTask( void )
|
||||
/*
|
||||
* See header file for description.
|
||||
*/
|
||||
portBASE_TYPE xPortStartScheduler( void )
|
||||
BaseType_t xPortStartScheduler( void )
|
||||
{
|
||||
int iSignal;
|
||||
sigset_t xSignals;
|
||||
@@ -307,7 +307,7 @@ void vPortEnableInterrupts( void )
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xPortSetInterruptMask( void )
|
||||
BaseType_t xPortSetInterruptMask( void )
|
||||
{
|
||||
/* Interrupts are always disabled inside ISRs (signals
|
||||
handlers). */
|
||||
@@ -315,7 +315,7 @@ portBASE_TYPE xPortSetInterruptMask( void )
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortClearInterruptMask( portBASE_TYPE xMask )
|
||||
void vPortClearInterruptMask( BaseType_t xMask )
|
||||
{
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@@ -55,7 +55,7 @@ int main(int argc, const char **argv)
|
||||
setvbuf(stdout, NULL, _IOLBF, 0);
|
||||
|
||||
usleep(1000);
|
||||
portBASE_TYPE res = xTaskCreatePinnedToCore(&main_task, "main",
|
||||
BaseType_t res = xTaskCreatePinnedToCore(&main_task, "main",
|
||||
ESP_TASK_MAIN_STACK, NULL,
|
||||
ESP_TASK_MAIN_PRIO, NULL, ESP_TASK_MAIN_CORE);
|
||||
assert(res == pdTRUE);
|
||||
|
Reference in New Issue
Block a user