From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v8 08/10] eal: add minimum viable code for eal on windows Date: Wed, 03 Apr 2019 00:39:11 +0200 Message-ID: <3599974.brf36yD2AO@xps> References: <20190306041634.12976-1-anand.rawat@intel.com> <20190402035458.14664-1-anand.rawat@intel.com> <20190402035458.14664-9-anand.rawat@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, bruce.richardson@intel.com, david.marchand@redhat.com To: Anand Rawat Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 6918A548B for ; Wed, 3 Apr 2019 00:39:15 +0200 (CEST) In-Reply-To: <20190402035458.14664-9-anand.rawat@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" I think the change below is bad because it is exposing an internal function in a header file which may be included by apps. I know you are still looking for pthread integration solutions, so we can discuss how to fix it later. Note that there is already an EAL function to create normal threads: rte_ctrl_thread_create() You may want a similar function for dataplane threads perhaps. 02/04/2019 05:54, Anand Rawat: > --- a/lib/librte_eal/windows/eal/include/rte_os.h > +++ b/lib/librte_eal/windows/eal/include/rte_os.h > @@ -15,7 +15,9 @@ > extern "C" { > #endif > > +#include > #include > +#include > > #define strerror_r(a, b, c) strerror_s(b, c, a) > > @@ -26,6 +28,24 @@ typedef SSIZE_T ssize_t; > > #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr) > > +/** > + * Create a thread. > + * This function is private to EAL. > + * > + * @param thread > + * The location to store the thread id if successful. > + * @return > + * 0 for success, -1 if the thread is not created. > + */ > +int eal_thread_create(pthread_t *thread); > + > +/** > + * Create a map of processors and cores on the system. > + * This function is private to EAL. > + * > + */ > +void eal_create_cpu_map(void);