summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support/cmpxchg_loop.h
Commit message (Collapse)AuthorAgeFilesLines
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* Add missing license headersEric Fiselier2016-01-191-0/+9
| | | | llvm-svn: 258196
* PR20546: Fix tests for compare_exchange_weak.Dan Albert2014-09-061-0/+51
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 llvm-svn: 217319
OpenPOWER on IntegriCloud