summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/malloc')
-rw-r--r--libc/stdlib/malloc/heap.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/libc/stdlib/malloc/heap.h b/libc/stdlib/malloc/heap.h
index 0210d9098..ab1a73896 100644
--- a/libc/stdlib/malloc/heap.h
+++ b/libc/stdlib/malloc/heap.h
@@ -135,14 +135,8 @@ extern void __heap_dump (struct heap *heap, const char *str);
extern void __heap_check (struct heap *heap, const char *str);
-#ifdef HEAP_USE_LOCKING
-# define __heap_lock(heap) __pthread_mutex_lock (&(heap)->lock)
-# define __heap_unlock(heap) __pthread_mutex_unlock (&(heap)->lock)
-#else /* !__UCLIBC_HAS_THREADS__ */
-/* Without threads, mutex operations are a nop. */
-# define __heap_lock(heap) (void)0
-# define __heap_unlock(heap) (void)0
-#endif /* HEAP_USE_LOCKING */
+#define __heap_lock(heap) __pthread_mutex_lock (&(heap)->lock)
+#define __heap_unlock(heap) __pthread_mutex_unlock (&(heap)->lock)
/* Delete the free-area FA from HEAP. */