From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v7 0/3] failsafe: fix hotplug races Date: Tue, 13 Feb 2018 22:21:32 +0100 Message-ID: <4199780.l4afLUpUQf@xps> References: <1518369872-12324-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: "De Lara Guarch, Pablo" , "dev@dpdk.org" , =?ISO-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Return-path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id DCFB21B2B2 for ; Tue, 13 Feb 2018 22:21:42 +0100 (CET) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 13/02/2018 22:13, Matan Azrad: > From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] > > There is a compilation error due to this patch on FreeBSD: > > > > drivers/net/failsafe/failsafe_private.h:377:53: error: format specifies type > > 'unsigned long' but the argument has type 'pthread_t' (aka 'struct pthread *') > > [-Werror,-Wformat] > > DEBUG("Hot-plug mutex was locked by thread %lu%s", pthread_self(), > > > > > > I am not sure how to print a pthread_t, so I can just report the issue. > > > Can you check with (unsigned long int) conversion? On FreeBSD, pthread_t is: typedef struct pthread *pthread_t; pthread_t is not portable and should not be printed. I am preparing a patch to enable pthread_t debugging only in Linux.