From cd705f8b93a913c7dd6afe1f7bf60019f47065bf Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 6 May 2015 18:29:43 +1000 Subject: [PATCH] Replace ETS_INTR_xxx with xTaskSuspend/Resume --- FreeRTOS/Source/portable/MemMang/heap_4.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/FreeRTOS/Source/portable/MemMang/heap_4.c b/FreeRTOS/Source/portable/MemMang/heap_4.c index ba53900..c60d87e 100644 --- a/FreeRTOS/Source/portable/MemMang/heap_4.c +++ b/FreeRTOS/Source/portable/MemMang/heap_4.c @@ -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 ) {