[libcxx-commits] [PATCH] D87323: Bring atomic header closer to C++20

Olivier Giroux via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 8 13:11:28 PDT 2020


__simt__ marked an inline comment as done.
__simt__ added inline comments.


================
Comment at: libcxx/include/atomic:1255
   _Tp __temp;
   __cxx_atomic_assign_volatile(__temp, __a->__a_value);
+  bool __ret = (memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
----------------
jfb wrote:
> Unrelated to your change, but the lock could come after `__temp`?
Yep.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87323/new/

https://reviews.llvm.org/D87323



More information about the libcxx-commits mailing list