summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc/heap.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/malloc/heap.h')
-rw-r--r--libc/stdlib/malloc/heap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/stdlib/malloc/heap.h b/libc/stdlib/malloc/heap.h
index 8b05cded1..2a686b601 100644
--- a/libc/stdlib/malloc/heap.h
+++ b/libc/stdlib/malloc/heap.h
@@ -19,6 +19,11 @@
# include <pthread.h>
# include <bits/uClibc_pthread.h>
# define HEAP_USE_LOCKING
+# define __heap_do_lock(heap_lock) __pthread_mutex_lock (heap_lock)
+# define __heap_do_unlock(heap_lock) __pthread_mutex_unlock (heap_lock)
+#else
+# define __heap_do_lock(heap_lock)
+# define __heap_do_unlock(heap_lock)
#endif