This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __atomic_add support without gthreads


>Alternatively, if you just want to write code which uses atomic
>operations, but you don't need the library to have multi-threaded
>support, then use the builtin __sync_XXX functions, not
>__atomic_add_dispatch and friends.

Yes, I definately have my own inline functions for atomic operations.
However, the case isn't that I want to call these functions directly,
but could use them indirectly when calling some libstdc++ classes
and templates.

I think some of the confusion on my part is that I sort of assumed
the gthreads was needed for mutex support and vice versa; and that
any "lock free" operation would be orthagonal to the availability
of gthreads.  But this doesn't seem to be the case.

--
Darin Johnson



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]