mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
multi_heap: use portENTER/EXIT_CRITICAL instead of taskENTER/EXIT_CRITICAL
This commit is contained in:

committed by
Mahavir Jain

parent
f65870566a
commit
573ea385b4
@@ -16,7 +16,6 @@
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
#include <rom/ets_sys.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -24,14 +23,14 @@
|
||||
we need to use portmux spinlocks here not RTOS mutexes */
|
||||
#define MULTI_HEAP_LOCK(PLOCK) do { \
|
||||
if((PLOCK) != NULL) { \
|
||||
taskENTER_CRITICAL((portMUX_TYPE *)(PLOCK)); \
|
||||
portENTER_CRITICAL((portMUX_TYPE *)(PLOCK)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
|
||||
#define MULTI_HEAP_UNLOCK(PLOCK) do { \
|
||||
if ((PLOCK) != NULL) { \
|
||||
taskEXIT_CRITICAL((portMUX_TYPE *)(PLOCK)); \
|
||||
portEXIT_CRITICAL((portMUX_TYPE *)(PLOCK)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
|
Reference in New Issue
Block a user