lkml.org 
[lkml]   [2008]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2008-02-17 05:17    [W:0.040 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site