Synchronize arena->tcache_ql with arena->tcache_ql_mtx.

This replaces arena->lock synchronization.
This commit is contained in:
Jason Evans
2017-02-12 18:50:53 -08:00
parent 6b5cba4191
commit ab25d3c987
5 changed files with 31 additions and 21 deletions

View File

@@ -135,9 +135,10 @@ struct arena_s {
* Stats from these are merged incrementally, and at exit if
* opt_stats_print is enabled.
*
* Synchronization: lock.
* Synchronization: tcache_ql_mtx.
*/
ql_head(tcache_t) tcache_ql;
malloc_mutex_t tcache_ql_mtx;
/* Synchronization: internal. */
prof_accum_t prof_accum;

View File

@@ -35,13 +35,14 @@ typedef int witness_comp_t (const witness_t *, void *, const witness_t *,
#define WITNESS_RANK_CORE 9U
#define WITNESS_RANK_ARENA 9U
#define WITNESS_RANK_EXTENTS 10U
#define WITNESS_RANK_EXTENT_FREELIST 11U
#define WITNESS_RANK_TCACHE_QL 10U
#define WITNESS_RANK_EXTENTS 11U
#define WITNESS_RANK_EXTENT_FREELIST 12U
#define WITNESS_RANK_RTREE_ELM 12U
#define WITNESS_RANK_RTREE 13U
#define WITNESS_RANK_BASE 14U
#define WITNESS_RANK_ARENA_LARGE 15U
#define WITNESS_RANK_RTREE_ELM 13U
#define WITNESS_RANK_RTREE 14U
#define WITNESS_RANK_BASE 15U
#define WITNESS_RANK_ARENA_LARGE 16U
#define WITNESS_RANK_LEAF 0xffffffffU
#define WITNESS_RANK_ARENA_BIN WITNESS_RANK_LEAF