9832fd
This is a partial recreation of this upstream commit, restricted to
9832fd
the __malloc_info function:
9832fd
9832fd
commit 4bf5f2224baa1590f92f7a26930928fe9f7e4b57
9832fd
Author: Florian Weimer <fweimer@redhat.com>
9832fd
Date:   Tue Sep 6 12:49:54 2016 +0200
9832fd
9832fd
    malloc: Automated part of conversion to __libc_lock
9832fd
9832fd
diff --git a/malloc/malloc.c b/malloc/malloc.c
9832fd
index 18e00315c6edba4d..d2a5e251da4f1191 100644
9832fd
--- a/malloc/malloc.c
9832fd
+++ b/malloc/malloc.c
9832fd
@@ -5049,7 +5049,7 @@ __malloc_info (int options, FILE *fp)
9832fd
       } sizes[NFASTBINS + NBINS - 1];
9832fd
 #define nsizes (sizeof (sizes) / sizeof (sizes[0]))
9832fd
 
9832fd
-      mutex_lock (&ar_ptr->mutex);
9832fd
+      __libc_lock_lock (ar_ptr->mutex);
9832fd
 
9832fd
       for (size_t i = 0; i < NFASTBINS; ++i)
9832fd
 	{
9832fd
@@ -5108,7 +5108,7 @@ __malloc_info (int options, FILE *fp)
9832fd
 	  avail += sizes[NFASTBINS - 1 + i].total;
9832fd
 	}
9832fd
 
9832fd
-      mutex_unlock (&ar_ptr->mutex);
9832fd
+      __libc_lock_unlock (ar_ptr->mutex);
9832fd
 
9832fd
       total_nfastblocks += nfastblocks;
9832fd
       total_fastavail += fastavail;