From: Andreas Schwab <schwab@suse.de>
To: Torvald Riegel <triegel@redhat.com>
Cc: GLIBC Devel <libc-alpha@sourceware.org>
Subject: Re: [PATCH 3/3] Update to new generic semaphore algorithm.
Date: Tue, 08 May 2018 14:00:00 -0000 [thread overview]
Message-ID: <mvmr2mm6ydm.fsf@suse.de> (raw)
In-Reply-To: <1417807446.25868.24.camel@triegel.csb> (Torvald Riegel's message of "Fri, 05 Dec 2014 20:24:06 +0100")
On Dez 05 2014, Torvald Riegel <triegel@redhat.com> wrote:
> diff --git a/nptl/sem_post.c b/nptl/sem_post.c
> index 4906adf..0877774 100644
> --- a/nptl/sem_post.c
> +++ b/nptl/sem_post.c
> +#else
> + /* Add a token to the semaphore. Similar to 64b version. */
> + unsigned int v = atomic_load_relaxed (&isem->value);
> + do
> {
> - int err = lll_futex_wake (&isem->value, 1,
> - isem->private ^ FUTEX_PRIVATE_FLAG);
> - if (__builtin_expect (err, 0) < 0)
> + if ((v << SEM_VALUE_SHIFT) == SEM_VALUE_MAX)
This can never be true because SEM_VALUE_MAX is uneven. Did you mean
(v >> SEM_VALUE_SHIFT)?
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2018-05-08 14:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 18:37 [PATCH 0/3] Fix semaphore destruction (BZ #12674) Torvald Riegel
2014-12-05 18:53 ` [PATCH 1/3] Use reliable sem_wait interruption in nptl/tst-sem6 Torvald Riegel
2014-12-06 13:50 ` Ondřej Bílka
2014-12-08 11:43 ` Torvald Riegel
2014-12-08 22:29 ` Ondřej Bílka
2014-12-09 10:16 ` Torvald Riegel
2014-12-09 16:50 ` Ondřej Bílka
2014-12-09 18:25 ` Torvald Riegel
2014-12-09 18:37 ` Rich Felker
2014-12-09 19:47 ` Torvald Riegel
2014-12-09 20:19 ` Rich Felker
2014-12-10 9:34 ` Torvald Riegel
2014-12-05 19:03 ` [PATCH 2/3] Fix nptl/tst-sem4: always start with a fresh semaphore Torvald Riegel
2014-12-06 13:55 ` Ondřej Bílka
2014-12-05 19:24 ` [PATCH 3/3] Update to new generic semaphore algorithm Torvald Riegel
2014-12-15 21:59 ` Torvald Riegel
2018-05-08 14:00 ` Andreas Schwab [this message]
2018-05-08 14:22 ` Torvald Riegel
2014-12-05 20:30 ` [PATCH 0/3] Fix semaphore destruction (BZ #12674) Rich Felker
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=mvmr2mm6ydm.fsf@suse.de \
--to=schwab@suse.de \
--cc=libc-alpha@sourceware.org \
--cc=triegel@redhat.com \
/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: link
Be 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).