History log of /external/libcxx/test/support/cmpxchg_loop.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ee226c05af9e0187098f43fb71465a581487af9b 09-Jun-2016 Dan Austin <danielaustin@google.com> Revert "Revert "Update aosp/master libcxx rebase to r263688""

This reverts commit 1d4a1edbc7e4461b59239e1b8297e9dd395a6322.

Change-Id: I2909937fe582f2c5552bc86e7f4d2d5cff0de0aa
/external/libcxx/test/support/cmpxchg_loop.h
1d4a1edbc7e4461b59239e1b8297e9dd395a6322 26-May-2016 Dan Albert <danalbert@google.com> Revert "Update aosp/master libcxx rebase to r263688"

The world is burning.

This reverts commit c004fd909c006eec55077c52ee119e1fa338c9e9, reversing
changes made to 1418e4163da4bb0b9e3fe496e51c23a0dce399d9.
/external/libcxx/test/support/cmpxchg_loop.h
fa1e5db3bc5f3a1a730455c8100850248b94c1ec 19-Jan-2016 Eric Fiselier <eric@efcs.ca> Add missing license headers

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@258196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/support/cmpxchg_loop.h
7ba3c57565e6658d8265b028a61c5731cf899495 06-Sep-2014 Dan Albert <danalbert@google.com> PR20546: Fix tests for compare_exchange_weak.

These calls are allowed to fail spuriously.

29.6.5.25:

Remark: A weak compare-and-exchange operation may fail spuriously.
That is, even when the contents of memory referred to by expected
and object are equal, it may return false and store back to expected
the same memory contents that were originally there. [ Note: This
spurious failure enables implementation of compare and-exchange on a
broader class of machines, e.g., load-locked store-conditional
machines. A consequence of spurious failure is that nearly all uses
of weak compare-and-exchange will be in a loop.

To fix this, we replace any assert() that expects
std::atomic::compare_exchange_weak() to return true with a loop. If the
call does not return true within N runs (with N currently equal to 10),
then the test fails.

http://llvm.org/bugs/show_bug.cgi?id=20546


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/support/cmpxchg_loop.h