[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F467305.3030901@zytor.com>
Date: Thu, 23 Feb 2012 09:10:29 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Jason Baron <jbaron@...hat.com>
CC: Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Steven Rostedt <rostedt@...dmis.org>, a.p.zijlstra@...llo.nl,
mathieu.desnoyers@...icios.com, davem@...emloft.net,
ddaney.cavm@...il.com, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
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.
--
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