Skip to content

Commit 0ff6efc

Browse files
committed
Merge pull request #1539 from hjelmn/sync_builtin
config: check for more __sync builtins
2 parents 8e988df + 98ce659 commit 0ff6efc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

config/opal_config_asm.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ AC_DEFUN([OPAL_CHECK_SYNC_BUILTIN_CSWAP_INT128], [
8888
AC_DEFUN([OPAL_CHECK_SYNC_BUILTINS], [
8989
AC_MSG_CHECKING([for __sync builtin atomics])
9090
91-
AC_TRY_LINK([], [__sync_synchronize()],
91+
AC_TRY_LINK([long tmp;], [__sync_synchronize();
92+
__sync_bool_compare_and_swap(&tmp, 0, 1);
93+
__sync_add_and_fetch(&tmp, 1);],
9294
[AC_MSG_RESULT([yes])
9395
$1],
9496
[AC_MSG_RESULT([no])

0 commit comments

Comments
 (0)