All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Rene Herman <rene.herman@keyaccess.nl>
Cc: Roel Kluin <12o3l@tiscali.nl>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] kernel/{exit.c, signal.c, power/process.c}: replace !likely(x) by likely(!x)
Date: Sat, 16 Feb 2008 19:56:49 -0800	[thread overview]
Message-ID: <47B7B081.8050306@zytor.com> (raw)
In-Reply-To: <47B79D0D.2070808@keyaccess.nl>

Rene Herman wrote:
> On 16-02-08 20:01, H. Peter Anvin wrote:
>> Roel Kluin wrote:
>>> Not entirely sure who to send this to
>>> ---
>>> Replace !likely(x) by likely(!x)
>>
>> Whoa...
>>
>> Are you sure this is correct?
>>
>> !likely(x) is equivalent to unlikely(!x)
> 
> Not with respect to its value I believe? likely(x) == !!(x), and 
> unlikely(!x) == !!(!x) = !x, so conditions work out differently?

You missed one ! sign:

!likely(x) == !!!(x) == unlikely(!x) == !!(!(x))

	-hpa

  reply	other threads:[~2008-02-17  3:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-16 15:58 [PATCH 2/2] kernel/{exit.c, signal.c, power/process.c}: replace !likely(x) by likely(!x) Roel Kluin
2008-02-16 19:01 ` H. Peter Anvin
2008-02-16 19:29   ` Roel Kluin
2008-02-16 19:31     ` H. Peter Anvin
2008-02-16 19:52       ` Roel Kluin
2008-02-17  2:33   ` Rene Herman
2008-02-17  3:56     ` H. Peter Anvin [this message]
2008-02-17  4:16       ` Rene Herman

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=47B7B081.8050306@zytor.com \
    --to=hpa@zytor.com \
    --cc=12o3l@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.herman@keyaccess.nl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.