public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] elf: Replace catomic_exchange_and_add with atomic_exchange_and_add Date: Thu, 10 Mar 2022 19:22:22 +0000 (GMT) [thread overview] Message-ID: <20220310192222.9255B3858424@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5d4e9a1ce048e3d821d8fd475e65bcbad534254a commit 5d4e9a1ce048e3d821d8fd475e65bcbad534254a Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Thu Mar 10 09:32:38 2022 -0300 elf: Replace catomic_exchange_and_add with atomic_exchange_and_add Diff: --- elf/dl-profile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elf/dl-profile.c b/elf/dl-profile.c index 9359be7c33..01e92361f6 100644 --- a/elf/dl-profile.c +++ b/elf/dl-profile.c @@ -548,7 +548,7 @@ _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc) size_t newfromidx; to_index = (data[narcs].self_pc / (HASHFRACTION * sizeof (*tos))); - newfromidx = catomic_exchange_and_add (&fromidx, 1) + 1; + newfromidx = atomic_exchange_and_add (&fromidx, 1) + 1; froms[newfromidx].here = &data[narcs]; froms[newfromidx].link = tos[to_index]; tos[to_index] = newfromidx; @@ -558,14 +558,14 @@ _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc) /* If we still have no entry stop searching and insert. */ if (*topcindex == 0) { - uint_fast32_t newarc = catomic_exchange_and_add (narcsp, 1); + uint_fast32_t newarc = atomic_exchange_and_add (narcsp, 1) + 1; /* In rare cases it could happen that all entries in FROMS are occupied. So we cannot count this anymore. */ if (newarc >= fromlimit) goto done; - *topcindex = catomic_exchange_and_add (&fromidx, 1) + 1; + *topcindex = atomic_exchange_and_add (&fromidx, 1) + 1; fromp = &froms[*topcindex]; fromp->here = &data[newarc];
reply other threads:[~2022-03-10 19:22 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220310192222.9255B3858424@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).