compnerd added inline comments. ================ Comment at: lib/Headers/intrin.h:504 @@ +503,3 @@ +_interlockedbittestandset_acq(long volatile *_BitBase, long _BitPos) { + long _PrevVal = __atomic_fetch_or(_BitBase, 1l << _BitPos, __ATOMIC_ACQUIRE); + return (_PrevVal >> _BitPos) & 1; ---------------- Perhaps we should add static asserts that _BitPos is within limits for the signed shift.
================ Comment at: lib/Headers/intrin.h:517 @@ -501,1 +516,3 @@ +} +#endif #ifdef __x86_64__ ---------------- Are the names supposed to be all lower case? https://reviews.llvm.org/D24609 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits