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