summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2013-10-21 21:59:10 (GMT)
committerJason Evans <je@fb.com>2013-10-21 21:59:10 (GMT)
commitf1c3da8b02489b7728d4275ac011336299eace62 (patch)
tree2a409791adb13f29a63d9826a136006f6f4a44c1 /src
parent6556e28be15d9acd8f3835fb9fad90145e1edbff (diff)
downloadjemalloc-f1c3da8b02489b7728d4275ac011336299eace62.zip
jemalloc-f1c3da8b02489b7728d4275ac011336299eace62.tar.gz
jemalloc-f1c3da8b02489b7728d4275ac011336299eace62.tar.bz2
Consistently use malloc_mutex_prefork().
Consistently use malloc_mutex_prefork() instead of malloc_mutex_lock() in all prefork functions.
Diffstat (limited to 'src')
-rw-r--r--src/chunk.c2
-rw-r--r--src/ctl.c2
-rw-r--r--src/prof.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/chunk.c b/src/chunk.c
index b17f43f..a93d28a 100644
--- a/src/chunk.c
+++ b/src/chunk.c
@@ -368,7 +368,7 @@ void
chunk_prefork(void)
{
- malloc_mutex_lock(&chunks_mtx);
+ malloc_mutex_prefork(&chunks_mtx);
if (config_ivsalloc)
rtree_prefork(chunks_rtree);
chunk_dss_prefork();
diff --git a/src/ctl.c b/src/ctl.c
index ebba7c2..68ffba3 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -929,7 +929,7 @@ void
ctl_prefork(void)
{
- malloc_mutex_lock(&ctl_mtx);
+ malloc_mutex_prefork(&ctl_mtx);
}
void
diff --git a/src/prof.c b/src/prof.c
index 4a12d1f..c0dad86 100644
--- a/src/prof.c
+++ b/src/prof.c
@@ -1245,10 +1245,10 @@ prof_prefork(void)
if (opt_prof) {
unsigned i;
- malloc_mutex_lock(&bt2ctx_mtx);
- malloc_mutex_lock(&prof_dump_seq_mtx);
+ malloc_mutex_prefork(&bt2ctx_mtx);
+ malloc_mutex_prefork(&prof_dump_seq_mtx);
for (i = 0; i < PROF_NCTX_LOCKS; i++)
- malloc_mutex_lock(&ctx_locks[i]);
+ malloc_mutex_prefork(&ctx_locks[i]);
}
}