From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7330 invoked by alias); 2 Jul 2019 12:14:23 -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 7277 invoked by uid 89); 2 Jul 2019 12:14:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:742 X-HELO: m15-114.126.com Received: from m15-114.126.com (HELO m15-114.126.com) (220.181.15.114) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Jul 2019 12:14:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Subject:From:Message-ID:Date:MIME-Version; bh=2isWM +3/PBLOPK7pQgcN/hCQMpMUZGLskFjHagX1FMI=; b=BgCB1TWuG/cA5PjlTieyT AyxhXB0zDvJvzipOE8LgRjXD+AsHKOm8Tsu/H9V051T1Jdr2MScuuy3Uhh+sduyG HG0XfVqV3GhcFYNHl+2agQ6OvXXELOnDTuDpKLWqbFndxb/Z8oPdvYOK9Q0szDrl +JKKKFO7LKA7C8qK5qhHZA= Received: from [192.168.1.223] (unknown [116.236.172.42]) by smtp7 (Coremail) with SMTP id DsmowABnsviPShtdp_KvIg--.39605S2; Tue, 02 Jul 2019 20:14:09 +0800 (CST) Subject: Re: [Mingw-w64-public] Fwd: [patch] Reimplement GNU threads library on native Windows To: Jonathan Wakely , mingw-w64-public@lists.sourceforge.net Cc: Eric Botcazou , libstdc++@gcc.gnu.org, GCC Patches References: <2175092.5hV0XgF4mA@polaris> <30ed46f2-6672-f805-9627-05c31c8a708e@codeweavers.com> <715159ed-1f9b-768e-8ac1-130d0dcbbfd1@126.com> <2395489.buBb56uQH1@polaris> <20437f86-a861-4e70-7e84-d623652bb73e@codeweavers.com> <3dc7173a-75e9-006a-8bb6-cd1459897b6e@codeweavers.com> <20190702120033.GJ4665@redhat.com> From: Liu Hao Openpgp: preference=signencrypt Message-ID: <805a5c8f-ee20-fbae-dbdc-111a0e9c690a@126.com> Date: Tue, 02 Jul 2019 12:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190702120033.GJ4665@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="A93ZDrYa7KeTqCY3aXpg4imysLrytDlv4" X-SW-Source: 2019-07/txt/msg00143.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --A93ZDrYa7KeTqCY3aXpg4imysLrytDlv4 Content-Type: multipart/mixed; boundary="26znnVCfUxCHoEjW1xBB2o7UWmJumGdYd"; protected-headers="v1" From: Liu Hao To: Jonathan Wakely , mingw-w64-public@lists.sourceforge.net Cc: Eric Botcazou , libstdc++@gcc.gnu.org, GCC Patches Message-ID: <805a5c8f-ee20-fbae-dbdc-111a0e9c690a@126.com> Subject: Re: [Mingw-w64-public] Fwd: [patch] Reimplement GNU threads library on native Windows References: <2175092.5hV0XgF4mA@polaris> <30ed46f2-6672-f805-9627-05c31c8a708e@codeweavers.com> <715159ed-1f9b-768e-8ac1-130d0dcbbfd1@126.com> <2395489.buBb56uQH1@polaris> <20437f86-a861-4e70-7e84-d623652bb73e@codeweavers.com> <3dc7173a-75e9-006a-8bb6-cd1459897b6e@codeweavers.com> <20190702120033.GJ4665@redhat.com> In-Reply-To: <20190702120033.GJ4665@redhat.com> --26znnVCfUxCHoEjW1xBB2o7UWmJumGdYd Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Content-length: 700 =E5=9C=A8 2019/7/2 =E4=B8=8B=E5=8D=888:00, Jonathan Wakely =E5=86=99=E9=81= =93: > The C++ standard says: >=20 > "The library may reuse the value of a thread::id of a terminated > thread that can no longer be joined." >=20 > So that's not a reason to use a handle. According to MSDN [1] a thread ID is valid 'until the thread has been terminated' so I presume a terminated but unclosed thread does not have a thread ID. This could also mean that there is no effect way to denote a thread uniquely. As a consequence libstdc++ may have to its own bookkeeping mechanism. [1] https://docs.microsoft.com/en-us/windows/desktop/ProcThread/thread-handles-= and-identifiers --=20 Best regards, LH_Mouse --26znnVCfUxCHoEjW1xBB2o7UWmJumGdYd-- --A93ZDrYa7KeTqCY3aXpg4imysLrytDlv4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEn9eDGptREvfrWRePQbMyeCIxW8QFAl0bSo8ACgkQQbMyeCIx W8RlBRAAzQjIuT5/cUuVGOfd29/hs73hfaZa2Q5wZ1h1T5GcRcXYr+tvHC0Ld6hU nHUyg9G1nsHYxSIfOvGnmv0JennyIK97S9X3j7qRcr9Bbc62Y0xddw8qqAasiITB Romj0SoMZa3IWRZKige1Cm+bOw2Sq88wW5+dOraiXFAjH/gsFg86LdLPClPqzIU5 TqhPpZIOfd6iIfCw6zPHFmThvp9pK8LoaY8VSLOEEjuELo1RFLBWlsy9s4ORYJ+V ZU/XQtaFD60nR25JTLFxnrGtOZljMDvyzzhWhbC1YC4fnDko1xZyl4O9Nb9CSl9O 3odDjGgZXn3FpV66e2paUpLNyPvJWajrhUDRFZOTpqh1hfBalmcD+7Bdu4Kh2Rdd j+9B9tnLqJxGETCSgBqKfSIwYIJoZ3Rbjok9MGABS6Vcs98rqY8qZ6FT/jnNJXvF U7dhxiKIluX/72DJQsr1bIwD1xGIIMjgdgefatXwQSlWWfdJvBfW5IdZrYOO6m+x WA41Ge62QJweYJBRWNEZmV8/IsS8Pgu2lhGA1LcPs4nyT6kdcwpDDOIVnTmx7Gdl /pYtXQDvUgBrDusdyFbAdpl6BOXpj2DL8Z80aV0tDQsvemvoKIARDGEmtYaFSoil GSPAbqGkbjFsyQsmLRRYkZpBq3RRkk5obB/DSGKun3TlAGJG834= =QSF8 -----END PGP SIGNATURE----- --A93ZDrYa7KeTqCY3aXpg4imysLrytDlv4--