Rename tsd->offset_state to tsd->prng_state.

This commit is contained in:
Qi Wang 2019-11-04 16:48:12 -08:00 committed by Qi Wang
parent 19a51abf33
commit bc774a3519
3 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@
* w: prof_sample_event_wait (config_prof)
* x: prof_sample_last_event (config_prof)
* p: prof_tdata (config_prof)
* v: offset_state
* v: prng_state
* i: iarena
* a: arena
* o: arenas_tdata
@ -88,7 +88,7 @@ typedef void (*test_callback_t)(int *);
O(prof_sample_event_wait, uint64_t, uint64_t) \
O(prof_sample_last_event, uint64_t, uint64_t) \
O(prof_tdata, prof_tdata_t *, prof_tdata_t *) \
O(offset_state, uint64_t, uint64_t) \
O(prng_state, uint64_t, uint64_t) \
O(iarena, arena_t *, arena_t *) \
O(arena, arena_t *, arena_t *) \
O(arenas_tdata, arena_tdata_t *, arena_tdata_t *)\
@ -119,7 +119,7 @@ typedef void (*test_callback_t)(int *);
/* prof_sample_event_wait */ THREAD_EVENT_MIN_START_WAIT, \
/* prof_sample_last_event */ 0, \
/* prof_tdata */ NULL, \
/* offset_state */ 0, \
/* prng_state */ 0, \
/* iarena */ NULL, \
/* arena */ NULL, \
/* arenas_tdata */ NULL, \

View File

@ -185,7 +185,7 @@ extent_addr_randomize(tsdn_t *tsdn, arena_t *arena, extent_t *extent,
if (!tsdn_null(tsdn)) {
tsd_t *tsd = tsdn_tsd(tsdn);
r = (size_t)prng_lg_range_u64(
tsd_offset_statep_get(tsd), lg_range);
tsd_prng_statep_get(tsd), lg_range);
} else {
uint64_t stack_value = (uint64_t)(uintptr_t)&r;
r = (size_t)prng_lg_range_u64(&stack_value, lg_range);

View File

@ -230,7 +230,7 @@ tsd_data_init(tsd_t *tsd) {
* cost of test repeatability. For debug builds, instead use a
* deterministic seed.
*/
*tsd_offset_statep_get(tsd) = config_debug ? 0 :
*tsd_prng_statep_get(tsd) = config_debug ? 0 :
(uint64_t)(uintptr_t)tsd;
tsd_thread_event_init(tsd);