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 1AEBF439C5; Thu, 25 Jan 2024 23:34:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D5D5402AB; Thu, 25 Jan 2024 23:34:40 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 74BFA4029B for ; Thu, 25 Jan 2024 23:34:39 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id AD45D20E56BC; Thu, 25 Jan 2024 14:34:38 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AD45D20E56BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1706222078; bh=XZ7awXAFql8FYFwb3kbhABgJjRDJDuAW8tqECO+9+rs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KluanaAPt5FfBuDjl7Sk0x7F1iZv3ixt2WojEfU0plqqshyVGme0dy2MSHUQ2F3JP yjfO11jMC7v82UtPcW8H6dmpbo3sQXcNsdWaKLQSy5PUdM9oQeOjgsSMu5cic6YLsU 8brk0ELtlsLwjZEO2vK/69O1hoRavIlCxtU0ORio= Date: Thu, 25 Jan 2024 14:34:38 -0800 From: Tyler Retzlaff To: Morten =?iso-8859-1?Q?Br=F8rup?= Cc: Mattias =?iso-8859-1?Q?R=F6nnblom?= , dev@dpdk.org, Tyler Retzlaff , konstantin.v.ananyev@yandex.ru Subject: Re: rte_atomic_*_explicit Message-ID: <20240125223438.GA22922@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <0e268757-8368-456f-ba2f-10a1969c498f@lysator.liu.se> <98CBD80474FA8B44BF855DF32C47DC35E9F1A2@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F1A2@smartserver.smartshare.dk> 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 Thu, Jan 25, 2024 at 11:10:47PM +0100, Morten Brørup wrote: > > From: Mattias Rönnblom [mailto:hofors@lysator.liu.se] > > Sent: Thursday, 25 January 2024 19.54 > > > > Why do rte_stdatomic.h functions have the suffix "_explicit"? > > Especially > > since there aren't any wrappers for the implicit variants. > > > > More to type, more to read. > > They have the "_explicit" suffix to make their names similar to those in stdatomic.h. > > You might consider their existence somewhat temporary until C11 stdatomics can be fully phased in, so there's another argument for similar names. (This probably does not happen as long as compilers generate slower code for C11 stdatomics than with their atomic built-ins.) yes, there was feedback at the time it was. * we should *not* have non-explicit versions of the macros * the atomic generic functions should be named to match C11 standard with a rte_ prefix. > > > > > When was this API introduced? Shouldn't it say "experimental" > > somewhere? > > They were introduced as part of the migration to C11. > I suppose they were not marked experimental because they replaced something we didn't want anymore (the compiler built-ins for atomics, e.g. __atomic_load_n()). I don't recall if we discussed experimental marking or not. i don't think we discussed it since they're wrapper macros. > > > Reverse paper trail: > https://git.dpdk.org/dpdk/log/lib/eal/include/rte_stdatomic.h > https://patchwork.dpdk.org/project/dpdk/patch/1692738045-32363-2-git-send-email-roretzla@linux.microsoft.com/ > https://patchwork.dpdk.org/project/dpdk/patch/1692738045-32363-2-git-send-email-roretzla@linux.microsoft.com/ >