lkml.org 
[lkml]   [2012]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups + docs
On 02/23/2012 08:21 AM, Jason Baron wrote:
>
> So, we could get rid of the '&' with something as simple as:
>
> #define very_unlikely(key) __very_unlikely(&key)
>
> However, it does seem potentially more error prone, b/c if 'key' is
> passed to a function, and they we do the very_unlikely() we end up with
> the address parameter (due to pass by value). That said, it doesn't look
> like anybody is using very_unlikely() in that manner in the tree, and we
> could document the usage.
>

The normal way to do this is to make the type an array of size 1.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2012-02-23 18:13    [W:0.108 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site