aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-04-13 14:11:42 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-04-13 14:11:42 -0500
commitf95984beb2d3d61c71c14c10cdc5ab8fda321dec (patch)
tree437af083a41aaae93a8b036e6a092f49ac4a97f4
parent13a601a0dfb468552c1eebf5c225392260f0bda2 (diff)
downloadglibc-f95984beb2d3d61c71c14c10cdc5ab8fda321dec.zip
glibc-f95984beb2d3d61c71c14c10cdc5ab8fda321dec.tar.gz
glibc-f95984beb2d3d61c71c14c10cdc5ab8fda321dec.tar.bz2
malloc: Update comment for list_lock
(cherry picked from commit 7962541a32eff5597bc4207e781cfac8d1bb0d87)
-rw-r--r--ChangeLog4
-rw-r--r--malloc/arena.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d97ce5a..fa02ac9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2016-04-13 Florian Weimer <fweimer@redhat.com>
+ * malloc/arena.c (list_lock): Update comment.
+
+2016-04-13 Florian Weimer <fweimer@redhat.com>
+
* malloc/tst-malloc-thread-exit.c: Include test-skeleton.c early.
(do_test): Limit the number of arenas, so that we can use fewer
outer threads. Limit timeout to 3 seconds, in preparation for a
diff --git a/malloc/arena.c b/malloc/arena.c
index 463d31d..f03dcb2 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -85,9 +85,10 @@ static mstate free_list;
_int_new_arena. This suffers from data races; see the FIXME
comments in _int_new_arena and reused_arena.
- list_lock also prevents concurrent forks. When list_lock is
- acquired, no arena lock must be acquired, but it is permitted to
- acquire arena locks after list_lock. */
+ list_lock also prevents concurrent forks. At the time list_lock is
+ acquired, no arena lock must have been acquired, but it is
+ permitted to acquire arena locks subsequently, while list_lock is
+ acquired. */
static mutex_t list_lock = MUTEX_INITIALIZER;
/* Mapped memory in non-main arenas (reliable only for NO_THREADS). */