[PATCH] shared_ptr : atomic ref-counts (TSan)

Eric Fiselier eric at efcs.ca
Tue May 19 17:22:18 PDT 2015


I was recently corrected. The change for `long` to `std::atomic<long>` doesn't break the ABI because they are layout compatible and there is no constructor code.

However

1. `<atomic>` only compiles with clang in c++11 mode and with some GCC versions. This restriction is somewhat artificial.
2. This is a pessimization when the program is single threaded. Not much we can do about that at this point though.

Neither of these things should block the patch but we should be aware.

@mclow.lists This looks like a good reason to lift the restrictions on atomic.


http://reviews.llvm.org/D8147

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list