From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52742 invoked by alias); 2 Jul 2019 09:19:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 52606 invoked by uid 89); 2 Jul 2019 09:19:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:514, H*f:sk:2175092, H*f:sk:30ed46f, HTo:D*126.com X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Jul 2019 09:19:51 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 95CFE81F5E; Tue, 2 Jul 2019 11:19:48 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 82mlu7cCqMkB; Tue, 2 Jul 2019 11:19:48 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 702DA814C6; Tue, 2 Jul 2019 11:19:48 +0200 (CEST) From: Eric Botcazou To: Liu Hao Cc: mingw-w64-public@lists.sourceforge.net, Jacek Caban , NightStrike , libstdc++@gcc.gnu.org, GCC Patches Subject: Re: [Mingw-w64-public] Fwd: [patch] Reimplement GNU threads library on native Windows Date: Tue, 02 Jul 2019 09:19:00 -0000 Message-ID: <2395489.buBb56uQH1@polaris> In-Reply-To: <715159ed-1f9b-768e-8ac1-130d0dcbbfd1@126.com> References: <2175092.5hV0XgF4mA@polaris> <30ed46f2-6672-f805-9627-05c31c8a708e@codeweavers.com> <715159ed-1f9b-768e-8ac1-130d0dcbbfd1@126.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2019-07/txt/msg00115.txt.bz2 > It seems inappropriate to use handles as thread identifiers (as handles > imply resource ownership and are not unique identifiers); thread IDs (as > `DWORD` or `unsigned long`) would be a better alternative. This was considered but ultimately rejected, as you can do nothing with a thread Id, i.e. you need a handle for everything. But the __gthread_equal routine does compare the Ids and not the handles. -- Eric Botcazou