Skip to content

Conversation

@hjelmn
Copy link
Member

@hjelmn hjelmn commented Apr 12, 2016

This commit updates the check for __sync builtin atomics to see if the
compiler supports both __sync_bool_compare_and_swap and
__sync_add_and_fetch. If either of these functions are not available
then we can't use the __sync builtins.

Signed-off-by: Nathan Hjelm hjelmn@lanl.gov

This commit updates the check for __sync builtin atomics to see if the
compiler supports both __sync_bool_compare_and_swap and
__sync_add_and_fetch. If either of these functions are not available
then we can't use the __sync builtins.

Fixes open-mpi#1487

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
@hjelmn
Copy link
Member Author

hjelmn commented Apr 12, 2016

@bosilca Turns out some compiler versions have __sync_synchronize() but not the others. Go figure.

@jsquyres
Copy link
Member

👍

@bosilca
Copy link
Member

bosilca commented Apr 12, 2016

As CAS is the most basic atomic operation if we have it we could implement our own version of all the other atomics. But I am not sure this is worth the effort, especially when we already have atomic implementations for most of the architectures. 👍

@bosilca bosilca merged commit 0ff6efc into open-mpi:master Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants