olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1065574-5.patch

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