[Bug libstdc++/57060] std::this_thread::get_id() == std::thread::id::id() without -pthread
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 4 17:33:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57060
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Dec 4 17:32:40 2015
New Revision: 231289
URL: https://gcc.gnu.org/viewcvs?rev=231289&root=gcc&view=rev
Log:
PR libstdc++/57060 cope with invalid thread IDs
PR libstdc++/57060
* include/std/thread (operator==(thread::id, thread::id)): Do not use
__gthread_equal.
(operator<(thread::id, thread::id)): Add comment.
(this_thread::get_id()): Do not use __gthread_self for single-threaded
programs using glibc.
* testsuite/30_threads/this_thread/57060.cc: New.
Added:
trunk/libstdc++-v3/testsuite/30_threads/this_thread/57060.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/thread
More information about the Gcc-bugs
mailing list