summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc-standard/malloc.h
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-03-21 15:25:49 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:30 +0200
commit7431f726e2865028c98abc9ea765069fcfe4bc63 (patch)
treecfb435318a0932578172dc4d156d4d713cac59ed /libc/stdlib/malloc-standard/malloc.h
parent89b9f4592adb7aa2832b9efd95713b04f0ce185f (diff)
malloc.h: hide internal functions (mainly debug related)
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/stdlib/malloc-standard/malloc.h')
-rw-r--r--libc/stdlib/malloc-standard/malloc.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/libc/stdlib/malloc-standard/malloc.h b/libc/stdlib/malloc-standard/malloc.h
index 73d4b124d..9b411bdb8 100644
--- a/libc/stdlib/malloc-standard/malloc.h
+++ b/libc/stdlib/malloc-standard/malloc.h
@@ -26,7 +26,11 @@
-__UCLIBC_MUTEX_EXTERN(__malloc_lock);
+__UCLIBC_MUTEX_EXTERN(__malloc_lock)
+#if defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__
+ attribute_hidden
+#endif
+ ;
#define __MALLOC_LOCK __UCLIBC_MUTEX_LOCK(__malloc_lock)
#define __MALLOC_UNLOCK __UCLIBC_MUTEX_UNLOCK(__malloc_lock)
@@ -910,7 +914,7 @@ typedef struct malloc_state *mstate;
malloc relies on the property that malloc_state is initialized to
all zeroes (as is true of C statics).
*/
-extern struct malloc_state __malloc_state; /* never directly referenced */
+extern struct malloc_state __malloc_state attribute_hidden; /* never directly referenced */
/*
All uses of av_ are via get_malloc_state().
@@ -947,12 +951,12 @@ void __malloc_consolidate(mstate) attribute_hidden;
#define check_malloced_chunk(P,N) __do_check_malloced_chunk(P,N)
#define check_malloc_state() __do_check_malloc_state()
-extern void __do_check_chunk(mchunkptr p);
-extern void __do_check_free_chunk(mchunkptr p);
-extern void __do_check_inuse_chunk(mchunkptr p);
-extern void __do_check_remalloced_chunk(mchunkptr p, size_t s);
-extern void __do_check_malloced_chunk(mchunkptr p, size_t s);
-extern void __do_check_malloc_state(void);
+extern void __do_check_chunk(mchunkptr p) attribute_hidden;
+extern void __do_check_free_chunk(mchunkptr p) attribute_hidden;
+extern void __do_check_inuse_chunk(mchunkptr p) attribute_hidden;
+extern void __do_check_remalloced_chunk(mchunkptr p, size_t s) attribute_hidden;
+extern void __do_check_malloced_chunk(mchunkptr p, size_t s) attribute_hidden;
+extern void __do_check_malloc_state(void) attribute_hidden;
#include <assert.h>