[PATCH] eal/x86: fix build on systems with WAITPKG support
Bruce Richardson
bruce.richardson at intel.com
Mon Aug 28 13:03:40 CEST 2023
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);
}
and similarly we could do a rte_cast_no_const(const void *x).
WDYT?
/Bruce
More information about the dev
mailing list