This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
__atomic_add support without gthreads
- From: "DARIN JOHNSON" <darin at usa dot net>
- To: <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 20 Feb 2009 16:34:32 -0800
- Subject: __atomic_add support without gthreads
- Z-usanet-msgid: XID499NBuaIh0272X40
I noticed some support was in for using atomic operations in
some C++ library functions in GCC 4.2. However when looking
through the code it seems as if some case is being left out.
The code seems to assume either __GTHREADS is being used, or
the application is purely single-threaded. There's no third
choice where __atomic_add_dispatch() does an atomic add even
if GTHREADS is not used. I want to avoid creating a gthreads
wrapper for our OS.
Am I missing something here?
--
Darin Johnson