| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
I had written the patch that added this test before the tests were
moved into tests/std, so the test ended up in the wrong directory.
llvm-svn: 225300
|
|
|
|
| |
llvm-svn: 225287
|
|
|
|
|
|
|
| |
This is just a compile time test, but we have MSAN buildbots that will
fail since `exp` was uninitialized.
llvm-svn: 225286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Excerpt from [atomics.types.operations.req]/21:
> When only one memory_order argument is supplied, the value of
> success is order, and the value of failure is order except that a
> value of memory_order_acq_rel shall be replaced by the value
> memory_order_acquire and a value of memory_order_release shall be
> replaced by the value memory_order_relaxed.
Clean up some copy pasta while I'm here (someone added a return
statement to a void function).
Reviewers: EricWF, jroelofs, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6632
llvm-svn: 225280
|
|
|
|
| |
llvm-svn: 224658
|
|
|
|
| |
llvm-svn: 223600
|
|
|
|
|
|
|
|
| |
guard is #defined
http://reviews.llvm.org/D6006
llvm-svn: 220729
|
|
|
|
|
|
| |
defined.
llvm-svn: 220722
|
|
|
|
| |
llvm-svn: 220154
|
|
|
|
|
|
| |
functionality change
llvm-svn: 220142
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
If you're crazy enough to want this sort of thing, then add
-D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and
--param=additiona_features=libcpp-has-no-threads to your lit commnad line.
http://reviews.llvm.org/D3969
llvm-svn: 217271
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MacKenzie.
The way the standard currently specifies the default constructor for atomic<T>
requires T to be nothrow default constructible. This patch makes our test types
meet this requirement.
Note: The nothrow default constructible requirment is subject to the outcome of
LWG issue 1265.
llvm-svn: 216561
|
|
|
|
| |
llvm-svn: 214406
|
|
|
|
|
|
|
|
| |
corresponding tests. I've used macros to fall back to a user-provided default constructor if _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS (though I suspect that there won't be many users defining that macro).
The tests use placement new to check that atomic values get properly zero-initialized. I had to modify the atomic_is_lock_free test, because default initialization of an object of const type 'const A' (aka 'const atomic<int>') requires a user-provided default constructor.
llvm-svn: 180945
|
|
|
|
| |
llvm-svn: 171498
|
|
|
|
|
|
|
| |
at the moment, but they allow these tests to be used to test clang against
libstdc++. Add myself to the credits file, as suggested by Howard.
llvm-svn: 155085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compare-and-exchange failed (it should update the expected value to the current
value, and the tests were checking that it didn't...).
Results of the atomics part of the test suite on FreeBSD with clang trunk and
the atomic.c from compiler-rt (currently kludged into the test, not installed
properly):
****************************************************
Results for /root/libc++/test/atomics:
using clang version 3.1 (trunk 153415)
Target: x86_64-unknown-freebsd10.0
Thread model: posix
with -std=c++0x -stdlib=libc++ -pthread /tmp/atomic.o
----------------------------------------------------
sections without tests : 0
sections with failures : 0
sections without failures: 14
+ ----
total number of sections : 14
----------------------------------------------------
number of tests failed : 0
number of tests passed : 52
+ ----
total number of tests : 52
****************************************************
Yay!
llvm-svn: 154095
|
|
|
|
|
|
|
|
| |
copyable.
Now all of the test cases compile. Some of them even run!
llvm-svn: 154094
|
|
|
|
|
|
| |
library part of <atomic>. It currently won't even parse as it depends on the existence of the intrinsics specified at http://libcxx.llvm.org/atomic_design_a.html. Everything has been tested using fake intrinsics which have now been removed. As the intrinsics come online, the ATOMIC_* macros will need to be adjusted to reflect which operations are lock-free. These macros will probably need to be #ifdef'd for each supported platform.
llvm-svn: 121267
|
|
|
|
| |
llvm-svn: 121202
|
|
|
|
| |
llvm-svn: 121181
|
|
|
|
|
|
| |
And I believe the intrinsic spec at http://libcxx.llvm.org/atomic_design_a.html is still good.
llvm-svn: 121064
|
|
|
|
| |
llvm-svn: 120045
|
|
|
|
| |
llvm-svn: 120043
|
|
|
|
| |
llvm-svn: 120040
|
|
|
|
| |
llvm-svn: 119395
|
|
|
|
| |
llvm-svn: 117033
|
|
|
|
|
|
| |
atomic_uint, atomic_long, atomic_ulong, atomic_llong, atomic_ullong, atomic_char16_t, atomic_char32_t and atomic_wchar_t.
llvm-svn: 116860
|
|
|
|
| |
llvm-svn: 116813
|
|
|
|
|
|
| |
by which the compiler only needs to define the strongest intrinsics it can. Weaker atomics in the library automatically try stronger and stronger variants, picking the weakest compiler intrinsic available. If no compiler intrinsics are available for a given operation, the library locks a mutex and does the job. Better documentation to follow...
llvm-svn: 115538
|
|
|
|
|
|
| |
be made to work without defaulted default constructors.
llvm-svn: 115207
|
|
|
|
| |
llvm-svn: 115087
|
|
|
|
| |
llvm-svn: 115058
|
|
|
|
|
|
| |
implementable on any compiler at my disposal...
llvm-svn: 115054
|
|
|
|
| |
llvm-svn: 114967
|
|
|
|
| |
llvm-svn: 114966
|
|
llvm-svn: 114887
|