Rename atomic_*_{uint32,uint64,u}() to atomic_*_{u32,u64,zu}().
This change conforms to naming conventions throughout the codebase.
This commit is contained in:
@@ -1541,7 +1541,7 @@ ssize_t
|
||||
arena_decay_time_default_get(void)
|
||||
{
|
||||
|
||||
return ((ssize_t)atomic_read_z((size_t *)&decay_time_default));
|
||||
return ((ssize_t)atomic_read_zu((size_t *)&decay_time_default));
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -1550,7 +1550,7 @@ arena_decay_time_default_set(ssize_t decay_time)
|
||||
|
||||
if (!arena_decay_time_valid(decay_time))
|
||||
return (true);
|
||||
atomic_write_z((size_t *)&decay_time_default, (size_t)decay_time);
|
||||
atomic_write_zu((size_t *)&decay_time_default, (size_t)decay_time);
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
12
src/extent.c
12
src/extent.c
@@ -291,14 +291,14 @@ extent_register(tsdn_t *tsdn, const extent_t *extent)
|
||||
|
||||
if (config_prof && opt_prof && extent_active_get(extent)) {
|
||||
size_t nadd = extent_size_get(extent) >> LG_PAGE;
|
||||
size_t cur = atomic_add_z(&curpages, nadd);
|
||||
size_t high = atomic_read_z(&highpages);
|
||||
while (cur > high && atomic_cas_z(&highpages, high, cur)) {
|
||||
size_t cur = atomic_add_zu(&curpages, nadd);
|
||||
size_t high = atomic_read_zu(&highpages);
|
||||
while (cur > high && atomic_cas_zu(&highpages, high, cur)) {
|
||||
/*
|
||||
* Don't refresh cur, because it may have decreased
|
||||
* since this thread lost the highpages update race.
|
||||
*/
|
||||
high = atomic_read_z(&highpages);
|
||||
high = atomic_read_zu(&highpages);
|
||||
}
|
||||
if (cur > high && prof_gdump_get_unlocked())
|
||||
prof_gdump(tsdn);
|
||||
@@ -347,8 +347,8 @@ extent_deregister(tsdn_t *tsdn, extent_t *extent)
|
||||
|
||||
if (config_prof && opt_prof && extent_active_get(extent)) {
|
||||
size_t nsub = extent_size_get(extent) >> LG_PAGE;
|
||||
assert(atomic_read_z(&curpages) >= nsub);
|
||||
atomic_sub_z(&curpages, nsub);
|
||||
assert(atomic_read_zu(&curpages) >= nsub);
|
||||
atomic_sub_zu(&curpages, nsub);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user