[PATCH] eal/x86: fix build on systems with WAITPKG support
Ferruh Yigit
ferruh.yigit at amd.com
Mon Aug 28 16:31:31 CEST 2023
On 8/28/2023 12:03 PM, Bruce Richardson wrote:
> On Mon, Aug 28, 2023 at 12:42:38PM +0200, Stephen Hemminger wrote:
>> For humor
>> #define RTE_CASTAWAY(x) ((void *)(uinptr_t)(x))
>
> Yes, actually thought about that. Was also wondering about making it an
> inline function rather than macro, to ensure its only used on pointers, and
> to make clear what is being cast away:
>
> static inline void *
> rte_cast_no_volatile(volatile void *x)
> {
> return (void *)(uintptr_t)(x);
> }
>
Not as good, without 'castaway' in the API/macro name :)
> and similarly we could do a rte_cast_no_const(const void *x).
>
> WDYT?
>
> /Bruce
More information about the dev
mailing list