From dfb67cef912b2ab298033a60a2ac0e6fdc919095 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Fri, 18 Dec 2020 17:30:40 +0100 Subject: [PATCH] cpu/msp430_common: use malloc_thread_safe This should fix concurrent dynamic memory allocation. --- cpu/msp430_common/Kconfig | 1 + cpu/msp430_common/Makefile.dep | 3 +++ 2 files changed, 4 insertions(+) diff --git a/cpu/msp430_common/Kconfig b/cpu/msp430_common/Kconfig index cbdf20e7d4..4a598fdb21 100644 --- a/cpu/msp430_common/Kconfig +++ b/cpu/msp430_common/Kconfig @@ -13,6 +13,7 @@ config CPU_ARCH_MSP430 select HAS_PERIPH_FLASHPAGE select HAS_PERIPH_FLASHPAGE_PAGEWISE select HAS_PERIPH_PM + select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG config CPU_CORE_MSP430 bool diff --git a/cpu/msp430_common/Makefile.dep b/cpu/msp430_common/Makefile.dep index 8f533012bf..54590f7a88 100644 --- a/cpu/msp430_common/Makefile.dep +++ b/cpu/msp430_common/Makefile.dep @@ -6,3 +6,6 @@ DEFAULT_MODULE += newlib ifneq (,$(filter newlib,$(USEMODULE))) USEMODULE += newlib_nano endif + +# Make calls to malloc and friends thread-safe +USEMODULE += malloc_thread_safe