diff options
| author | rin <rin@NetBSD.org> | 2020-04-22 08:45:06 +0000 |
|---|---|---|
| committer | rin <rin@NetBSD.org> | 2020-04-22 08:45:06 +0000 |
| commit | dd8433b111cfe9a88a2eabeebb6a438d45f45994 (patch) | |
| tree | b778483d78059671eb48c4b5f47371cc74c2365a /lib/libc/stdlib | |
| parent | c5959b8123e99493afa281ebe522628342665d33 (diff) | |
Fix previous for libhack, where _REENTRANT is not defined;
arenas_map_key is used only when NO_TLS && _REENTRANT.
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/jemalloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/stdlib/jemalloc.c b/lib/libc/stdlib/jemalloc.c index 897cce07575..c3588ce1b04 100644 --- a/lib/libc/stdlib/jemalloc.c +++ b/lib/libc/stdlib/jemalloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: jemalloc.c,v 1.49 2020/04/21 22:22:55 joerg Exp $ */ +/* $NetBSD: jemalloc.c,v 1.50 2020/04/22 08:45:06 rin Exp $ */ /*- * Copyright (C) 2006,2007 Jason Evans <jasone@FreeBSD.org>. @@ -117,7 +117,7 @@ #include <sys/cdefs.h> /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */ -__RCSID("$NetBSD: jemalloc.c,v 1.49 2020/04/21 22:22:55 joerg Exp $"); +__RCSID("$NetBSD: jemalloc.c,v 1.50 2020/04/22 08:45:06 rin Exp $"); #ifdef __FreeBSD__ #include "libc_private.h" @@ -775,14 +775,14 @@ static __attribute__((tls_model("initial-exec"))) __thread arena_t **arenas_map; #else static arena_t **arenas_map; -static thread_key_t arenas_map_key = -1; #endif #if !defined(NO_TLS) || !defined(_REENTRANT) # define get_arenas_map() (arenas_map) # define set_arenas_map(x) (arenas_map = x) -#else +#else /* NO_TLS && _REENTRANT */ +static thread_key_t arenas_map_key = -1; static inline arena_t ** get_arenas_map(void) @@ -823,7 +823,7 @@ set_arenas_map(arena_t **a) thr_setspecific(arenas_map_key, a); #endif } -#endif +#endif /* NO_TLS && _REENTRANT */ #ifdef MALLOC_STATS /* Chunk statistics. */ |
