mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(heap): use _SAFE version of critical section
because we allow to call malloc and free in an ISR context
This commit is contained in:
parent
fd3d1aa101
commit
956ec54aed
@ -19,14 +19,14 @@ typedef portMUX_TYPE multi_heap_lock_t;
|
||||
we need to use portmux spinlocks here not RTOS mutexes */
|
||||
#define MULTI_HEAP_LOCK(PLOCK) do { \
|
||||
if((PLOCK) != NULL) { \
|
||||
portENTER_CRITICAL((PLOCK)); \
|
||||
portENTER_CRITICAL_SAFE((PLOCK)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
|
||||
#define MULTI_HEAP_UNLOCK(PLOCK) do { \
|
||||
if ((PLOCK) != NULL) { \
|
||||
portEXIT_CRITICAL((PLOCK)); \
|
||||
portEXIT_CRITICAL_SAFE((PLOCK)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user