This is the mail archive of the
mailing list for the GCC 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: mingw-w64-public at lists dot sourceforge dot net, Jacek Caban <jacek at codeweavers dot com>, NightStrike <nightstrike at gmail dot com>, libstdc++ at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 02 Jul 2019 11:19:46 +0200
- Subject: Re: [Mingw-w64-public] Fwd: [patch] Reimplement GNU threads library on native Windows
- References: <2175092.5hV0XgF4mA@polaris> <firstname.lastname@example.org> <email@example.com>
> 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.