Messages in this thread | | | Date | Thu, 23 Feb 2012 09:10:29 -0800 | From | "H. Peter Anvin" <> | Subject | Re: [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.
| |