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:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user