feat(freertos): Link SoftIsrHdl and its sub functions to IRAM

This commit is contained in:
dongheng
2019-03-06 10:24:03 +08:00
parent 49a48fd5a3
commit d67265f034
5 changed files with 14 additions and 14 deletions

View File

@ -50,7 +50,7 @@ static void task_yield_wrapper(void)
portYIELD();
}
static void task_yield_from_isr_wrapper(void)
static void IRAM_ATTR task_yield_from_isr_wrapper(void)
{
portYIELD();
}
@ -206,7 +206,7 @@ static bool queue_send_wrapper(void *queue, void *item, uint32_t block_time_tick
return ret == pdPASS ? true : false;
}
static bool queue_send_from_isr_wrapper(void *queue, void *item, int *hptw)
static bool IRAM_ATTR queue_send_from_isr_wrapper(void *queue, void *item, int *hptw)
{
signed portBASE_TYPE ret;
@ -342,7 +342,7 @@ void *osi_task_top_sp(void)
return pxCurrentTCB[0];
}
const wifi_osi_funcs_t s_wifi_osi_funcs = {
wifi_osi_funcs_t s_wifi_osi_funcs = {
.version = ESP_WIFI_OS_ADAPTER_VERSION,
.task_create = task_create_wrapper,

View File

@ -71,7 +71,7 @@ void vListInitialiseItem( ListItem_t * const pxItem )
}
/*-----------------------------------------------------------*/
void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
void IRAM_ATTR vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
{
ListItem_t * const pxIndex = pxList->pxIndex;
@ -167,7 +167,7 @@ const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
}
/*-----------------------------------------------------------*/
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
UBaseType_t IRAM_ATTR uxListRemove( ListItem_t * const pxItemToRemove )
{
/* The list item knows which list it is in. Obtain the list from the list
item. */

View File

@ -920,7 +920,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
}
/*-----------------------------------------------------------*/
BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition )
BaseType_t IRAM_ATTR xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition )
{
BaseType_t xReturn;
UBaseType_t uxSavedInterruptStatus;
@ -2037,7 +2037,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
#endif /* configUSE_MUTEXES */
/*-----------------------------------------------------------*/
static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition )
static BaseType_t IRAM_ATTR prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition )
{
BaseType_t xReturn = pdFALSE;
UBaseType_t uxMessagesWaiting;
@ -2843,7 +2843,7 @@ BaseType_t xReturn;
#if ( configUSE_QUEUE_SETS == 1 )
static BaseType_t prvNotifyQueueSetContainer( const Queue_t * const pxQueue, const BaseType_t xCopyPosition )
static BaseType_t IRAM_ATTR prvNotifyQueueSetContainer( const Queue_t * const pxQueue, const BaseType_t xCopyPosition )
{
Queue_t *pxQueueSetContainer = pxQueue->pxQueueSetContainer;
BaseType_t xReturn = pdFALSE;

View File

@ -2873,7 +2873,7 @@ BaseType_t xSwitchRequired = pdFALSE;
#endif /* configUSE_APPLICATION_TASK_TAG */
/*-----------------------------------------------------------*/
void vTaskSwitchContext( void )
void IRAM_ATTR vTaskSwitchContext( void )
{
if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
{
@ -3006,7 +3006,7 @@ void vTaskPlaceOnUnorderedEventList( List_t * pxEventList, const TickType_t xIte
#endif /* configUSE_TIMERS */
/*-----------------------------------------------------------*/
BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
BaseType_t IRAM_ATTR xTaskRemoveFromEventList( const List_t * const pxEventList )
{
TCB_t *pxUnblockedTCB;
BaseType_t xReturn;
@ -3781,7 +3781,7 @@ static void prvCheckTasksWaitingTermination( void )
#endif /* INCLUDE_vTaskDelete */
/*-----------------------------------------------------------*/
static void prvResetNextTaskUnblockTime( void )
static void IRAM_ATTR prvResetNextTaskUnblockTime( void )
{
TCB_t *pxTCB;
@ -3939,7 +3939,7 @@ TCB_t *pxTCB;
#if ( configUSE_MUTEXES == 1 )
BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder )
BaseType_t IRAM_ATTR xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder )
{
TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder;
BaseType_t xReturn = pdFALSE;

View File

@ -118,7 +118,7 @@ void IRAM_ATTR HDL_MAC_SIG_IN_LV1_ISR(void)
extern portBASE_TYPE MacIsrSigPostDefHdl(void);
void SoftIsrHdl(void* arg)
void IRAM_ATTR SoftIsrHdl(void* arg)
{
ETS_NMI_LOCK();
@ -130,7 +130,7 @@ void SoftIsrHdl(void* arg)
}
if (xHigherPriorityTaskWoken || (SWReq == 1)) {
_xt_timer_int1();
_xt_timer_int1(); // call vTaskSwitchContext
SWReq = 0;
}