From aab07d0500d06e1de93280cb9900b24fd0c0875b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 6 Dec 2005 01:29:10 +0000 Subject: macro out the thread funcs in libc if threading is disabled --- libc/stdlib/malloc/heap.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'libc/stdlib/malloc') 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. */ -- cgit v1.2.3