From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8B434A0547; Thu, 29 Apr 2021 14:05:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42E58410DD; Thu, 29 Apr 2021 14:05:15 +0200 (CEST) Received: from mail-109-mta5.mxroute.com (mail-109-mta5.mxroute.com [136.175.109.5]) by mails.dpdk.org (Postfix) with ESMTP id 9F2D3406FF for ; Thu, 29 Apr 2021 14:05:13 +0200 (CEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-109-mta5.mxroute.com (ZoneMTA) with ESMTPSA id 1791d84bfae0004964.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 29 Apr 2021 12:05:09 +0000 X-Zone-Loop: ed4e3dace59b8ae9a6286b0b25b2df18bd3e4a05c0a1 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ashroe.eu; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bMxQ8aVoI5u64T+A/k9PQJ7wBF1NDxbtm1Rl2QJvHi8=; b=lAd8fOuDN3KfQfOtM7KL4c8YBg DWON94lKb/QX84tBg5GRjTjVIbGJaUOOfY2yxBQdfFK/IWvuKOEgCWmlyWikZ0dKuJwJQ8uWi61JL 6qf6Im6sFEA1tjzjowecgqG5QSi2WL6k6OqGOrnv8af2dUvw3NZkGgFil04ln0onbg3Vu7ItZigli AgI/P72QqlIz/TEfYqakXIMZcAXofSSwIRt0nZ5ma9rFoKbkNvNUhFw/nHNS5o4gsCzKYPICmWrYW s2ggN94oNIWqjW95ABBDgANCkqsqb7Uq2CRoEFeGKO92o+3p5y+6PwAqpXVIXimhVA5+tNlV1vWIO TtMPEhGg==; To: Thomas Monjalon , Narcisa Ana Maria Vasile , Dmitry Kozlyuk Cc: dev@dpdk.org, khot@microsoft.com, navasile@microsoft.com, dmitrym@microsoft.com, roretzla@microsoft.com, talshn@nvidia.com, ocardona@microsoft.com, bruce.richardson@intel.com, david.marchand@redhat.com, pallavi.kadam@intel.com References: <1617057640-24301-2-git-send-email-navasile@linux.microsoft.com> <1617413948-10504-2-git-send-email-navasile@linux.microsoft.com> <20210429035029.349d3306@sovereign> <33056936.xYFp2keEGj@thomas> From: "Kinsella, Ray" Message-ID: Date: Thu, 29 Apr 2021 13:05:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <33056936.xYFp2keEGj@thomas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-AuthUser: mdr@ashroe.eu Subject: Re: [dpdk-dev] [PATCH v6 01/10] eal: add thread id and simple thread functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 29/04/2021 08:44, Thomas Monjalon wrote: > 29/04/2021 02:50, Dmitry Kozlyuk: >> 2021-04-02 18:38 (UTC-0700), Narcisa Ana Maria Vasile: >>> --- /dev/null >>> +++ b/lib/librte_eal/windows/include/rte_windows_thread_types.h >>> @@ -0,0 +1,12 @@ >>> +/* SPDX-License-Identifier: BSD-3-Clause >>> + * Copyright(c) 2021 Microsoft Corporation >>> + */ >>> + >>> +#ifndef _RTE_THREAD_TYPES_H_ >>> +#define _RTE_THREAD_TYPES_H_ >>> + >>> +#include >>> + >>> +typedef DWORD rte_thread_t; >>> + >>> +#endif /* _RTE_THREAD_TYPES_H_ */ >> >> pthread_t type in pthreads-win32 and winpthread is not 32 bit. >> DPDK will have different ABI depending on a threading backend used. >> Apps must know it at build time then. How do they discover it? >> This is worth a warning in commit log and docs. > > Not sure this is an acceptable behaviour. > In my opinion, ABI should not vary. > +Cc Ray > So pthread_t on Win32 should just map to the HANDLE datatype. Which if memory serves is in fact a DWORD on Win32. So I suspect that pthreads indirection is probably be just providing a circuitous route to end up in the same place, a HANDLE IMHO To absolutely guarantee no ABI change, we ought to be passing back void * not rte_thread_t. #ifdef WIN32 /* The primitives for Windows types */ .. typedef HANDLE apr_os_thread_t; /*becomes pthread_t later*/ .. Ray K