[PATCH] eal/x86: fix build on systems with WAITPKG support
Tyler Retzlaff
roretzla at linux.microsoft.com
Mon Aug 28 17:56:59 CEST 2023
On Mon, Aug 28, 2023 at 12:03:40PM +0100, 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);
> }
>
> and similarly we could do a rte_cast_no_const(const void *x).
>
> WDYT?
since we're introducing humor! now announcing dpdk requires C23 comliant
compiler for typeof_unqual! https://en.cppreference.com/w/c/language/typeof
i like the idea, i like it being inline function you could use the name
'unqual' if you wanted to mimic a name similar to standard C typeof.
it could be 1 function that strips all qualifications or N that strip
specific qualifications, const, volatile and _Atomic not sure which is
best.
ty
>
> /Bruce
More information about the dev
mailing list