From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4848 invoked by alias); 30 Jul 2019 08:50:58 -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 4673 invoked by uid 89); 30 Jul 2019 08:50:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:600, H*M:home 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, 30 Jul 2019 08:50:56 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 64D7C813A1; Tue, 30 Jul 2019 10:50:54 +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 Qf1p_hPFDZaH; Tue, 30 Jul 2019 10:50:54 +0200 (CEST) Received: from arcturus.home (adijon-653-1-143-55.w86-204.abo.wanadoo.fr [86.204.134.55]) (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 07DC88139B; Tue, 30 Jul 2019 10:50:53 +0200 (CEST) From: Eric Botcazou To: Liu Hao Cc: gcc-patches@gcc.gnu.org, JonY <10walls@gmail.com>, Jonathan Wakely , mingw-w64-public@lists.sourceforge.net, libstdc++@gcc.gnu.org Subject: Re: [Mingw-w64-public] Fwd: [patch] Reimplement GNU threads library on native Windows Date: Tue, 30 Jul 2019 08:55:00 -0000 Message-ID: <1736907.Y27C5nNuBL@arcturus.home> In-Reply-To: References: <2175092.5hV0XgF4mA@polaris> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2019-07/txt/msg01775.txt.bz2 > 0) complexifies comparison of thread IDs without obvious benefits, and The reverse argument is also true: using IDs would complexify everything else with the only benefit of simplifying the equal primitive. > 1) does not work reliably because handles can be duplicated, and That's pure FUD. > 2) makes `__gthread_self()` return invalid handles in detached threads. Admittedly, but this can be fixed if this is deemed necessary by clearing the thread descriptor when detaching the thread. -- Eric Botcazou