From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B031541B17; Mon, 28 Aug 2023 17:57:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43DCE4026D; Mon, 28 Aug 2023 17:57:02 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8E68E4021E for ; Mon, 28 Aug 2023 17:57:00 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id B0CDF2129BD7; Mon, 28 Aug 2023 08:56:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B0CDF2129BD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1693238219; bh=PI7Zii41qwIH48CV2NHbAHea8pQ/JGSO9EA3fU56CH4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MbBG+62y4pfFWLIvkSwF5lvTb6FelF5WfDeNIFqzSg7n7AKClQA/j952PAp6YLWVg zRwNrZ53Aa3cHwo2wg714lUC0BU+Z1OO7LzhHlIp8isOb212P6rVmp6R75bidq7LQB PCRE+MU4zp8oTXW0/Es+3zrCuSszYbmLyOzMwCZk= Date: Mon, 28 Aug 2023 08:56:59 -0700 From: Tyler Retzlaff To: Bruce Richardson Cc: Stephen Hemminger , David Marchand , dev , Morten =?iso-8859-1?Q?Br=F8rup?= Subject: Re: [PATCH] eal/x86: fix build on systems with WAITPKG support Message-ID: <20230828155659.GA19688@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20230825152850.1107690-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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