mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-19 19:36:33 +03:00
Transition e_prof_tctx in struct extent to C11 atomics
This commit is contained in:
parent
7da04a6b09
commit
864adb7f42
2 changed files with 8 additions and 8 deletions
|
|
@ -173,8 +173,8 @@ extent_slab_data_get_const(const extent_t *extent) {
|
|||
|
||||
JEMALLOC_INLINE prof_tctx_t *
|
||||
extent_prof_tctx_get(const extent_t *extent) {
|
||||
return (prof_tctx_t *)atomic_read_p(
|
||||
&((extent_t *)extent)->e_prof_tctx_pun);
|
||||
return (prof_tctx_t *)atomic_load_p(&extent->e_prof_tctx,
|
||||
ATOMIC_ACQUIRE);
|
||||
}
|
||||
|
||||
JEMALLOC_INLINE void
|
||||
|
|
@ -272,7 +272,7 @@ extent_slab_set(extent_t *extent, bool slab) {
|
|||
|
||||
JEMALLOC_INLINE void
|
||||
extent_prof_tctx_set(extent_t *extent, prof_tctx_t *tctx) {
|
||||
atomic_write_p(&extent->e_prof_tctx_pun, tctx);
|
||||
atomic_store_p(&extent->e_prof_tctx, tctx, ATOMIC_RELEASE);
|
||||
}
|
||||
|
||||
JEMALLOC_INLINE void
|
||||
|
|
|
|||
|
|
@ -118,11 +118,11 @@ struct extent_s {
|
|||
/* Small region slab metadata. */
|
||||
arena_slab_data_t e_slab_data;
|
||||
|
||||
/* Profile counters, used for large objects. */
|
||||
union {
|
||||
void *e_prof_tctx_pun;
|
||||
prof_tctx_t *e_prof_tctx;
|
||||
};
|
||||
/*
|
||||
* Profile counters, used for large objects. Points to a
|
||||
* prof_tctx_t.
|
||||
*/
|
||||
atomic_p_t e_prof_tctx;
|
||||
};
|
||||
};
|
||||
typedef ql_head(extent_t) extent_list_t;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue