Fix arena_bind().
When tsd is not in nominal state (e.g. during thread termination), we should not increment nthreads.
This commit is contained in:
parent
9ebbfca93f
commit
57ed894f8a
@ -455,15 +455,16 @@ arena_bind(tsd_t *tsd, unsigned ind, bool internal)
|
||||
{
|
||||
arena_t *arena;
|
||||
|
||||
if (!tsd_nominal(tsd))
|
||||
return;
|
||||
|
||||
arena = arena_get(tsd_tsdn(tsd), ind, false);
|
||||
arena_nthreads_inc(arena, internal);
|
||||
|
||||
if (tsd_nominal(tsd)) {
|
||||
if (internal)
|
||||
tsd_iarena_set(tsd, arena);
|
||||
else
|
||||
tsd_arena_set(tsd, arena);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user