[Openmp-commits] [PATCH] D40171: Fix for OMP doacross implementation on 32-bit platforms
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Nov 17 07:21:55 PST 2017
AndreyChurbanov added inline comments.
================
Comment at: runtime/src/kmp_csupport.cpp:3809
+ // Treat pointer as volatile integer (value 0 or 1) until memory is allocated.
+ flags = (kmp_uint32 *)KMP_COMPARE_AND_STORE_RET32(
+ (volatile kmp_int32 *)&sh_buf->doacross_flags, NULL, 1);
----------------
Hahnfeld wrote:
> Should we introduce `KMP_COMPARE_AND_STORE_RETPTR` for this?
This is the only place in the code where CAS on pointer is interested in exact return value (to perform lock-less shared allocation), so the new macro won't help much I think. So I'd vote to leave it as is.
Repository:
rL LLVM
https://reviews.llvm.org/D40171
More information about the Openmp-commits
mailing list