This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] malloc: use tsd_getspecific for arena_get


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]