From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by dpdk.org (Postfix) with ESMTP id 05F00378E for ; Fri, 17 Apr 2015 00:19:58 +0200 (CEST) Received: by obbfy7 with SMTP id fy7so52835627obb.2 for ; Thu, 16 Apr 2015 15:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dhs9gsoBQUmUiARPcgRC/wULogLpAycW9qI0XLuvJ+I=; b=tKEnAusEShXZaoDM3xO8GMjPw8om26vRCYVijBqjGaYfslmSh/sUDU54rEgYjwfMlk 490txQ9xJnNCmXZqyS8a3fck5fEnQnHhlkxAkEpYuS8mbyOFXz8X9SX0UNPWA0lzLWz0 K+XceqlvyRABMbugBPCwdn4ofVC2MDWLHOwqUdvpso0WqQnDJwqQqHMpfDIiwwxZvrpb jNgoe/fC28E5DPXCLpZpWxEt4OpLlGB0STNt8bNxtDAqUMM4XDcjygENJGJewc5eGAys NqtaOq0awf7ZeCLyMQzY9nf/jLk3H1tBNtogeNvHAy2bDucFNcrlb/raE/v3L8nBdmrm 0B5g== MIME-Version: 1.0 X-Received: by 10.202.220.135 with SMTP id t129mr22395021oig.115.1429222797515; Thu, 16 Apr 2015 15:19:57 -0700 (PDT) Received: by 10.202.179.6 with HTTP; Thu, 16 Apr 2015 15:19:57 -0700 (PDT) In-Reply-To: References: <1428608301-31033-1-git-send-email-rkerur@gmail.com> <1428608412-31191-1-git-send-email-rkerur@gmail.com> <1428608412-31191-2-git-send-email-rkerur@gmail.com> <1653003.yPkaDFgZKF@xps13> Date: Thu, 16 Apr 2015 15:19:57 -0700 Message-ID: From: Ravi Kerur To: Thomas Monjalon Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v5 1/8] Move common functions in eal_thread.c X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2015 22:19:58 -0000 On Tue, Apr 14, 2015 at 2:35 PM, Ravi Kerur wrote: > > > On Tue, Apr 14, 2015 at 6:59 AM, Thomas Monjalon < > thomas.monjalon@6wind.com> wrote: > >> Hi Ravi, >> >> 2015-04-09 12:40, Ravi Kerur: >> > --- a/lib/librte_eal/common/eal_common_thread.c >> > +++ b/lib/librte_eal/common/eal_common_thread.c >> [...] >> > +#ifdef RTE_EXEC_ENV_BSDAPP >> > +#include >> > +#include >> > +#else /* RTE_EXEC_ENV_BSDAPP */ >> > #include >> > +#endif /* RTE_EXEC_ENV_BSDAPP */ >> [...] >> > +#ifdef RTE_EXEC_ENV_BSDAPP >> > + RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%p;cpuset=[%s%s])\n", >> > + lcore_id, thread_id, cpuset, ret == 0 ? "" : "..."); >> > +#else /* RTE_EXEC_ENV_BSDAPP */ >> > + RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%x;cpuset=[%s%s])\n", >> > + lcore_id, (int)thread_id, cpuset, ret == 0 ? "" : "..."); >> > +#endif /* RTE_EXEC_ENV_BSDAPP */ >> >> These lines should stay in bsdapp and linuxapp directory. >> You can add a new function to eal_thread.h to format the thread id, >> so you'll be able to use %s in generic log above. >> > > Thomas, sure will make the changes. I will wait for additional comments if > any for other patches and send v6 together. > > Thanks. > > I plan to use pthread_setname_np after pthread_create and use pthread_getname_np in RTE_LOG. Both these library calls are available in BSD and Linux. Let me know if this is ok??