1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-27 12:15:39 +03:00

atomics: Remove unused atomics

Remove all unused atomics.  Replace uses of catomic_increment and
catomic_decrement with atomic_fetch_add_relaxed which maps to a standard
compiler builtin. Relaxed memory ordering is correct for simple counters
since they only need atomicity.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Wilco Dijkstra
2025-09-10 09:07:39 +00:00
parent 245ea60b0e
commit 210ee29503
7 changed files with 13 additions and 830 deletions

View File

@@ -553,7 +553,7 @@ _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc)
froms[newfromidx].here = &data[narcs];
froms[newfromidx].link = tos[to_index];
tos[to_index] = newfromidx;
catomic_increment (&narcs);
atomic_fetch_add_relaxed (&narcs, 1);
}
/* If we still have no entry stop searching and insert. */