From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] spinlock:move constructor function out of header Date: Thu, 14 Jul 2016 14:59:01 -0700 (PDT) Message-ID: <6049792.6bXVORrbVs@xps13> References: <1468531886-34205-1-git-send-email-keith.wiles@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, damarion@cisco.com, viktorin@rehivetech.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, david.marchand@6wind.com To: Keith Wiles Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 3266C2BD3 for ; Thu, 14 Jul 2016 23:59:03 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id f65so4889869wmi.0 for ; Thu, 14 Jul 2016 14:59:03 -0700 (PDT) In-Reply-To: <1468531886-34205-1-git-send-email-keith.wiles@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Thanks Keith for continuing work. 2016-07-14 14:31, Keith Wiles: > Moving the rte_rtm_init() constructor routine out of the > header file and into a new rte_spinlock.c for all archs/platforms. > Having constructor routines in a header file is not a good > place to keep these types of functions. > > The problem is with linking 3rd party libraries when > an application is not linked directly to dpdk libraries, which > in this case causes a missing symbol in the linking phase. > > Fixes: ba7468997ea6 ("spinlock: add HTM lock elision for x86") > > Originally submitted by Damjan Marion You should keep the original Signed-off and authorship (From: field) with "git am". It is also easier to track when using -v2 --in-reply-to=''. > Signed-off-by: Keith Wiles > --- > lib/librte_eal/bsdapp/eal/Makefile | 1 + > lib/librte_eal/common/arch/arm/rte_spinlock.c | 46 ++++++++++++++++++++++ > lib/librte_eal/common/arch/ppc_64/rte_spinlock.c | 46 ++++++++++++++++++++++ > lib/librte_eal/common/arch/tile/rte_spinlock.c | 46 ++++++++++++++++++++++ > lib/librte_eal/common/arch/x86/rte_spinlock.c | 46 ++++++++++++++++++++++ > .../common/include/arch/x86/rte_spinlock.h | 14 ++----- > lib/librte_eal/linuxapp/eal/Makefile | 1 + I am not sure we should add a .c file for each arch, given it is called only from arch/x86/rte_spinlock.h.