Commit Graph

4 Commits

Author SHA1 Message Date
Dan Austin
ee226c05af Revert "Revert "Update aosp/master libcxx rebase to r263688""
This reverts commit 1d4a1edbc7.

Change-Id: I2909937fe582f2c5552bc86e7f4d2d5cff0de0aa
2016-06-08 22:25:43 +00:00
Dan Albert
1d4a1edbc7 Revert "Update aosp/master libcxx rebase to r263688"
The world is burning.

This reverts commit c004fd909c, reversing
changes made to 1418e4163d.
2016-05-25 22:36:09 -07:00
Eric Fiselier
fa1e5db3bc Add missing license headers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@258196 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 21:52:04 +00:00
Dan Albert
7ba3c57565 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
2014-09-06 20:38:25 +00:00