diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-12-06 01:29:10 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-12-06 01:29:10 +0000 |
commit | aab07d0500d06e1de93280cb9900b24fd0c0875b (patch) | |
tree | 7122ec94b0498c150b69401a13f06aaea803cf50 /libc/stdlib/malloc | |
parent | 680f8428162687caae571090e008b42d18f2bb5a (diff) |
macro out the thread funcs in libc if threading is disabled
Diffstat (limited to 'libc/stdlib/malloc')
-rw-r--r-- | libc/stdlib/malloc/heap.h | 10 |
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. */ |