[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <47B7B518.7060509@keyaccess.nl>
Date: Sun, 17 Feb 2008 05:16:24 +0100
From: Rene Herman <rene.herman@...access.nl>
To: "H. Peter Anvin" <hpa@...or.com>
CC: Roel Kluin <12o3l@...cali.nl>, lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] kernel/{exit.c, signal.c, power/process.c}: replace
!likely(x) by likely(!x)
On 17-02-08 04:56, H. Peter Anvin wrote:
> 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))
Yup, sorry, misread.
Rene.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists