From 2665915cfc46aa6403bb2efd473c523d3167e0cb Mon Sep 17 00:00:00 2001 From: "Andre Vieira (lists)" Date: Thu, 16 Jun 2016 12:23:51 +0100 Subject: [PATCH] Re-enable malloc_lock for newlib-nano Re-enable the use of __malloc_lock and __malloc_unlock newlib-nano, tied the newlib-multithread. --- newlib/libc/stdlib/nano-mallocr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/newlib/libc/stdlib/nano-mallocr.c b/newlib/libc/stdlib/nano-mallocr.c index 4a2f4680e..0b5631cae 100644 --- a/newlib/libc/stdlib/nano-mallocr.c +++ b/newlib/libc/stdlib/nano-mallocr.c @@ -58,9 +58,8 @@ #define RCALL reent_ptr, #define RONECALL reent_ptr -/* Disable MALLOC_LOCK so far. So it won't be thread safe */ -#define MALLOC_LOCK /*__malloc_lock(reent_ptr) */ -#define MALLOC_UNLOCK /*__malloc_unlock(reent_ptr) */ +#define MALLOC_LOCK __malloc_lock(reent_ptr) +#define MALLOC_UNLOCK __malloc_unlock(reent_ptr) #define RERRNO reent_ptr->_errno