This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Mingw-w64-public] Fwd: [patch] Reimplement GNU threads library on native Windows
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Liu Hao <lh_mouse at 126 dot com>
- Cc: gcc-patches at gcc dot gnu dot org, JonY <10walls at gmail dot com>, Jonathan Wakely <jwakely at redhat dot com>, mingw-w64-public at lists dot sourceforge dot net, libstdc++ at gcc dot gnu dot org
- Date: Tue, 30 Jul 2019 10:50:59 +0200
- Subject: Re: [Mingw-w64-public] Fwd: [patch] Reimplement GNU threads library on native Windows
- References: <2175092.5hV0XgF4mA@polaris> <f25dbb2c-ea94-fc29-0514-ecec25e72e4b@gmail.com> <da6bb74c-03f0-b617-5722-b980346ac2e1@126.com>
> 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