This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] malloc: use tsd_getspecific for arena_get
- From: Joern Engel <joern at purestorage dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Cc: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>, Joern Engel <joern at purestorage dot org>
- Date: Mon, 25 Jan 2016 16:25:01 -0800
- Subject: [PATCH] malloc: use tsd_getspecific for arena_get
- Authentication-results: sourceware.org; auth=none
- References: <1453767942-19369-1-git-send-email-joern at purestorage dot com>
From: Joern Engel <joern@purestorage.org>
Whether the interface of tsd_getspecific is good or bad, code should
remain self-consistent. Changing the interface can be done at some
later time, if deemed useful.
JIRA: PURE-27597
---
tpc/malloc2.13/arena.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tpc/malloc2.13/arena.h b/tpc/malloc2.13/arena.h
index 6fc760f0d5ff..2e74cdb05d86 100644
--- a/tpc/malloc2.13/arena.h
+++ b/tpc/malloc2.13/arena.h
@@ -773,7 +773,7 @@ static struct malloc_state *arena_get(size_t size)
struct malloc_state *arena = NULL;
int node = getnode();
- arena = pthread_getspecific(arena_key);
+ tsd_getspecific(arena_key, arena);
if (!arena || arena->numa_node != node)
arena = numa_arena[node];
if (arena && !mutex_trylock(&arena->mutex)) {
--
2.7.0.rc3