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 operations for shared_ptr ?


On 08/25/2013 01:52 PM, Oleg Endo wrote:

Just for my understanding, on targets that use 32 bit pointers and have
a 64 bit atomic (compare and) exchange, that would be a no-brainer,
wouldn't it?

Unfortunately, no. At least i686 requires 8-byte alignment for the pair, while we currently only provide 4-byte alignment. Similarly for x86_64, where it's 16-byte alignment vs 8-byte.

--
Florian Weimer / Red Hat Product Security Team


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