summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Vieira (lists) <Andre.SimoesDiasVieira@arm.com>2016-06-16 12:23:51 +0100
committerCorinna Vinschen <corinna@vinschen.de>2016-06-16 14:20:44 +0200
commit2665915cfc46aa6403bb2efd473c523d3167e0cb (patch)
tree6cbcdee981d614a746f858c4427268084e4af6f2
parent747b3f44e3799e6db4e49423875f2807e392205d (diff)
downloadcygnal-2665915cfc46aa6403bb2efd473c523d3167e0cb.tar.gz
cygnal-2665915cfc46aa6403bb2efd473c523d3167e0cb.tar.bz2
cygnal-2665915cfc46aa6403bb2efd473c523d3167e0cb.zip
Re-enable malloc_lock for newlib-nano
Re-enable the use of __malloc_lock and __malloc_unlock newlib-nano, tied the newlib-multithread.
-rw-r--r--newlib/libc/stdlib/nano-mallocr.c5
1 files 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