diff options
author | David Goldblatt <davidgoldblatt@fb.com> | 2017-04-05 00:22:24 (GMT) |
---|---|---|
committer | David Goldblatt <davidtgoldblatt@gmail.com> | 2017-04-05 23:25:37 (GMT) |
commit | 56b72c7b1781ef75c2450a08e08079fe164bb2df (patch) | |
tree | 4b03ba95e15ea95377b179b7654435ea277cef81 /include/jemalloc | |
parent | bc32ec3503433fae4c737c7ffe6b3822ce98d5d8 (diff) | |
download | jemalloc-56b72c7b1781ef75c2450a08e08079fe164bb2df.zip jemalloc-56b72c7b1781ef75c2450a08e08079fe164bb2df.tar.gz jemalloc-56b72c7b1781ef75c2450a08e08079fe164bb2df.tar.bz2 |
Transition arena struct fields to C11 atomics
Diffstat (limited to 'include/jemalloc')
-rw-r--r-- | include/jemalloc/internal/arena_structs_b.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/jemalloc/internal/arena_structs_b.h b/include/jemalloc/internal/arena_structs_b.h index fe4e4ee..00e0d0c 100644 --- a/include/jemalloc/internal/arena_structs_b.h +++ b/include/jemalloc/internal/arena_structs_b.h @@ -134,7 +134,7 @@ struct arena_s { * * Synchronization: atomic. */ - unsigned nthreads[2]; + atomic_u_t nthreads[2]; /* * When percpu_arena is enabled, to amortize the cost of reading / @@ -173,17 +173,21 @@ struct arena_s { * * Synchronization: atomic. */ - size_t extent_sn_next; + atomic_zu_t extent_sn_next; - /* Synchronization: atomic. */ - dss_prec_t dss_prec; + /* + * Represents a dss_prec_t, but atomically. + * + * Synchronization: atomic. + */ + atomic_u_t dss_prec; /* * Number of pages in active extents. * * Synchronization: atomic. */ - size_t nactive; + atomic_zu_t nactive; /* * Extant large allocations. @@ -222,7 +226,7 @@ struct arena_s { * * Synchronization: atomic. */ - pszind_t extent_grow_next; + atomic_u_t extent_grow_next; /* * Freelist of extent structures that were allocated via base_alloc(). |