summaryrefslogtreecommitdiffstats
path: root/contrib/jemalloc/src/tsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/jemalloc/src/tsd.c')
-rw-r--r--contrib/jemalloc/src/tsd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/jemalloc/src/tsd.c b/contrib/jemalloc/src/tsd.c
index 0838dc8..281a2e9 100644
--- a/contrib/jemalloc/src/tsd.c
+++ b/contrib/jemalloc/src/tsd.c
@@ -32,6 +32,7 @@ malloc_tsd_no_cleanup(void *arg)
}
#ifdef JEMALLOC_MALLOC_THREAD_CLEANUP
+JEMALLOC_ATTR(visibility("default"))
void
_malloc_thread_cleanup(void)
{
@@ -45,7 +46,7 @@ _malloc_thread_cleanup(void)
again = false;
for (i = 0; i < ncleanups; i++) {
if (pending[i]) {
- pending[i] = cleanups[i].f(cleanups[i].arg);
+ pending[i] = cleanups[i]();
if (pending[i])
again = true;
}
@@ -55,12 +56,11 @@ _malloc_thread_cleanup(void)
#endif
void
-malloc_tsd_cleanup_register(bool (*f)(void *), void *arg)
+malloc_tsd_cleanup_register(bool (*f)(void))
{
assert(ncleanups < MALLOC_TSD_CLEANUPS_MAX);
- cleanups[ncleanups].f = f;
- cleanups[ncleanups].arg = arg;
+ cleanups[ncleanups] = f;
ncleanups++;
}
OpenPOWER on IntegriCloud