From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ravi Kerur Subject: Re: [PATCH v5 1/8] Move common functions in eal_thread.c Date: Thu, 16 Apr 2015 15:19:57 -0700 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Thomas Monjalon Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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??