public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: libc-ports@sourceware.org
Cc: "Ondřej Bílka" <neleai@seznam.cz>,
	"Atsushi Nemoto" <anemo@mba.ocn.ne.jp>,
	libc-alpha@sourceware.org
Subject: Re: [RFC][BZ #13690] Always read private before lll_unlock.
Date: Fri, 06 Dec 2013 21:12:00 -0000	[thread overview]
Message-ID: <201312061611.59957.vapier@gentoo.org> (raw)
In-Reply-To: <20131206194305.GA26401@domone.podge>

[-- Attachment #1: Type: Text/Plain, Size: 877 bytes --]

On Friday 06 December 2013 14:43:05 Ondřej Bílka wrote:
> --- /dev/null
> +++ b/include/futex_unlock.h

probably should live at nptl/lowlevellock_unlock

> @@ -0,0 +1,15 @@
> +#define lll_unlock(lock, private) \

all new files need a proper comment header block

> +  ((void)) ({								      \
> +    int __private = private;						      \
> +    __lll_unlock (lock, __private);					      \
> +  })
> +
> +#define lll_unlock(lock, private) \

did i misread, or are both of these macros named "lll_unlock" ?  should one 
have a __ prefix ?

> +  ((void) ({								      \
> +    int *__futex = &(lock);						      \
> +    int __val = atomic_exchange_rel (__futex, 0);			      \
> +    if (__builtin_expect (__val > 1, 0))				      \
> +      lll_futex_wake (__futex, 1, private);				      \
> +  }))
> +
> +

no trailing newlines please
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-12-06 21:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20131206190159.GA25502@domone.podge>
2013-12-06 19:43 ` Ondřej Bílka
2013-12-06 21:12   ` Mike Frysinger [this message]
2013-12-06 21:52     ` Ondřej Bílka
2013-12-18 20:43   ` Torvald Riegel

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=201312061611.59957.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@sourceware.org \
    --cc=neleai@seznam.cz \
    /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).