Replace ETS_INTR_xxx with xTaskSuspend/Resume

This commit is contained in:
Angus Gratton 2015-05-06 18:29:43 +10:00
parent 1ffbc303ff
commit cd705f8b93

View file

@ -154,10 +154,7 @@ void *pvPortMalloc( size_t xWantedSize )
xBlockLink *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
void *pvReturn = NULL;
// printf("%s %d %d\n", __func__, xWantedSize, xFreeBytesRemaining);
// vTaskSuspendAll();
ETS_INTR_LOCK();
vTaskSuspendAll();
{
/* If this is the first call to malloc then the heap will require
initialisation to setup the list of free blocks. */
@ -240,8 +237,7 @@ void *pvReturn = NULL;
}
}
}
// xTaskResumeAll();
ETS_INTR_UNLOCK();
xTaskResumeAll();
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
{