mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
freertos: removed likely macros from non-port specifics parts of freertos
fatfs: moved esp_compiler header file inside of disk implementation file
This commit is contained in:
parent
668b33dcf3
commit
d059a955ae
@ -18,6 +18,7 @@
|
||||
#include "ff.h"
|
||||
#include "esp_log.h"
|
||||
#include "diskio_rawflash.h"
|
||||
#include "esp_compiler.h"
|
||||
|
||||
static const char* TAG = "diskio_rawflash";
|
||||
|
||||
|
@ -20,7 +20,6 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_partition.h"
|
||||
#include "esp_compiler.h"
|
||||
|
||||
/**
|
||||
* Register spi flash partition
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "ff.h"
|
||||
#include "sdmmc_cmd.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_compiler.h"
|
||||
|
||||
static sdmmc_card_t* s_cards[FF_VOLUMES] = { NULL };
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include "sdmmc_cmd.h"
|
||||
#include "driver/sdmmc_host.h"
|
||||
#include "esp_compiler.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "esp_log.h"
|
||||
#include "diskio_wl.h"
|
||||
#include "wear_levelling.h"
|
||||
#include "esp_compiler.h"
|
||||
|
||||
static const char* TAG = "ff_diskio_spiflash";
|
||||
|
||||
|
@ -20,7 +20,6 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "wear_levelling.h"
|
||||
#include "esp_compiler.h"
|
||||
|
||||
|
||||
/**
|
||||
|
@ -444,7 +444,7 @@ BaseType_t xTimeoutOccurred = pdFALSE;
|
||||
event list item, and they should now be retrieved then cleared. */
|
||||
uxReturn = uxTaskResetEventItemValue();
|
||||
|
||||
if( unlikely (( uxReturn & eventUNBLOCKED_DUE_TO_BIT_SET ) == ( EventBits_t ) 0) )
|
||||
if( ( uxReturn & eventUNBLOCKED_DUE_TO_BIT_SET ) == ( EventBits_t ) 0 )
|
||||
{
|
||||
taskENTER_CRITICAL( &pxEventBits->eventGroupMux );
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ List_t * const pxList = ( List_t * ) pxItemToRemove->pvContainer;
|
||||
pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
|
||||
|
||||
/* Make sure the index is left pointing to a valid item. */
|
||||
if(likely(pxList->pxIndex == pxItemToRemove))
|
||||
if(pxList->pxIndex == pxItemToRemove)
|
||||
{
|
||||
pxList->pxIndex = pxItemToRemove->pxPrevious;
|
||||
}
|
||||
|
@ -782,7 +782,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
else if(unlikely(xYieldRequired != pdFALSE))
|
||||
else if(xYieldRequired != pdFALSE)
|
||||
{
|
||||
/* This path is a special case that will only get
|
||||
executed if the task was holding multiple mutexes
|
||||
@ -815,7 +815,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
else if(unlikely(xYieldRequired != pdFALSE))
|
||||
else if(xYieldRequired != pdFALSE)
|
||||
{
|
||||
/* This path is a special case that will only get
|
||||
executed if the task was holding multiple mutexes and
|
||||
@ -868,7 +868,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
||||
taskENTER_CRITICAL(&pxQueue->mux);
|
||||
|
||||
/* Update the timeout state to see if it has expired yet. */
|
||||
if(likely(xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ))
|
||||
if(xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
|
||||
{
|
||||
if( prvIsQueueFull( pxQueue ) != pdFALSE )
|
||||
{
|
||||
@ -1573,7 +1573,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
||||
taskENTER_CRITICAL(&pxQueue->mux);
|
||||
|
||||
/* Update the timeout state to see if it has expired yet. */
|
||||
if(likely(xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE))
|
||||
if(xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE)
|
||||
{
|
||||
if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
|
||||
{
|
||||
@ -1888,7 +1888,7 @@ BaseType_t xReturn = pdFALSE;
|
||||
}
|
||||
#endif /* configUSE_MUTEXES */
|
||||
}
|
||||
else if(likely(xPosition == queueSEND_TO_BACK))
|
||||
else if(xPosition == queueSEND_TO_BACK)
|
||||
{
|
||||
( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. */
|
||||
pxQueue->pcWriteTo += pxQueue->uxItemSize;
|
||||
|
@ -2467,7 +2467,7 @@ BaseType_t xSwitchRequired = pdFALSE;
|
||||
/* Only allow core 0 increase the tick count in the case of xPortSysTickHandler processing. */
|
||||
/* And allow core 0 and core 1 to unwind uxPendedTicks during xTaskResumeAll. */
|
||||
|
||||
if (likely(xPortInIsrContext()))
|
||||
if (xPortInIsrContext())
|
||||
{
|
||||
#if ( configUSE_TICK_HOOK == 1 )
|
||||
vApplicationTickHook();
|
||||
@ -4188,7 +4188,7 @@ For ESP32 FreeRTOS, vTaskEnterCritical implements both portENTER_CRITICAL and po
|
||||
{
|
||||
BaseType_t oldInterruptLevel=0;
|
||||
BaseType_t schedulerRunning = xSchedulerRunning;
|
||||
if(likely(schedulerRunning != pdFALSE))
|
||||
if(schedulerRunning != pdFALSE)
|
||||
{
|
||||
//Interrupts may already be disabled (because we're doing this recursively) but we can't get the interrupt level after
|
||||
//vPortCPUAquireMutex, because it also may mess with interrupts. Get it here first, then later figure out if we're nesting
|
||||
@ -4201,7 +4201,7 @@ For ESP32 FreeRTOS, vTaskEnterCritical implements both portENTER_CRITICAL and po
|
||||
vPortCPUAcquireMutexIntsDisabled( mux, portMUX_NO_TIMEOUT );
|
||||
#endif
|
||||
|
||||
if(likely(schedulerRunning != pdFALSE))
|
||||
if(schedulerRunning != pdFALSE)
|
||||
{
|
||||
TCB_t *tcb = pxCurrentTCB[xPortGetCoreID()];
|
||||
BaseType_t newNesting = tcb->uxCriticalNesting + 1;
|
||||
@ -4260,11 +4260,11 @@ For ESP32 FreeRTOS, vTaskExitCritical implements both portEXIT_CRITICAL and port
|
||||
#else
|
||||
vPortCPUReleaseMutexIntsDisabled( mux );
|
||||
#endif
|
||||
if(likely(xSchedulerRunning != pdFALSE))
|
||||
if(xSchedulerRunning != pdFALSE)
|
||||
{
|
||||
TCB_t *tcb = pxCurrentTCB[xPortGetCoreID()];
|
||||
BaseType_t nesting = tcb->uxCriticalNesting;
|
||||
if(likely(nesting > 0U))
|
||||
if(nesting > 0U)
|
||||
{
|
||||
nesting--;
|
||||
tcb->uxCriticalNesting = nesting;
|
||||
|
@ -410,7 +410,7 @@ DaemonTaskMessage_t xMessage;
|
||||
|
||||
/* Send a message to the timer service task to perform a particular action
|
||||
on a particular timer definition. */
|
||||
if(unlikely( xTimerQueue != NULL ))
|
||||
if( xTimerQueue != NULL )
|
||||
{
|
||||
/* Send a command to the timer service task to start the xTimer timer. */
|
||||
xMessage.xMessageID = xCommandID;
|
||||
@ -725,7 +725,7 @@ TickType_t xTimeNow;
|
||||
|
||||
/* Commands that are positive are timer commands rather than pended
|
||||
function calls. */
|
||||
if(likely( xMessage.xMessageID >= ( BaseType_t ) 0) )
|
||||
if( xMessage.xMessageID >= ( BaseType_t ) 0 )
|
||||
{
|
||||
/* The messages uses the xTimerParameters member to work on a
|
||||
software timer. */
|
||||
@ -759,7 +759,7 @@ TickType_t xTimeNow;
|
||||
case tmrCOMMAND_RESET_FROM_ISR :
|
||||
case tmrCOMMAND_START_DONT_TRACE :
|
||||
/* Start or restart a timer. */
|
||||
if(likely( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) == pdTRUE ))
|
||||
if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) == pdTRUE )
|
||||
{
|
||||
/* The timer expired before it was added to the active
|
||||
timer list. Process it now. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user