llvm-project/libcxx/src
Eric Fiselier 1faf289e27 [libcxx] Add atomic_support.h header to src that handles needed atomic operations.
Summary:
In some places in libc++ we need to use the `__atomic_*` builtins. This patch adds a header that provides access to those builtins in a uniform way from within the dylib source.

If the compiler building the dylib does not support these builtins then a warning is issued.

Only relaxed loads are needed within the headers. A singe function to do these relaxed loads has been added to `<memory>`.

This patch applies the new atomic builtins to `__shared_count` and `call_once`.

Reviewers: mclow.lists

Subscribers: majnemer, jroelofs, cfe-commits

Differential Revision: http://reviews.llvm.org/D10406

llvm-svn: 241532
2015-07-07 00:27:16 +00:00
..
support [libcxx] Add atomic_support.h header to src that handles needed atomic operations. 2015-07-07 00:27:16 +00:00
algorithm.cpp Allow libc++ to be built on systems without POSIX threads 2014-09-05 19:45:05 +00:00
bind.cpp
chrono.cpp When building libc++, we use '"' as a delimiter instead of '<' when including libc++ header files. This is so that the dylib gets built with our headers; rather than the system-installed ones. We do this in most places already, just fixing a couple of inconsistent uses. 2015-06-23 14:45:02 +00:00
condition_variable.cpp Allow libc++ to be built on systems without POSIX threads 2014-09-05 19:45:05 +00:00
config_elast.h Reword ELAST warning 2015-02-24 01:59:38 +00:00
debug.cpp Fix use after free and calls to operator comma in debug mode 2015-03-19 03:20:02 +00:00
exception.cpp Move uncaught_exeption() definition inside the #ifdef block like uncaught_exceptions() 2015-06-02 22:25:23 +00:00
future.cpp Fix PR23293 - Do not unlock shared state before notifying consumers. 2015-06-12 00:41:34 +00:00
hash.cpp Fix typos 2014-05-15 11:27:39 +00:00
ios.cpp [libcxx] Set _LIBCPP_ELAST for mingw. 2015-01-06 17:34:51 +00:00
iostream.cpp Make the presence of stdin and stdout optional. 2015-03-26 14:35:46 +00:00
locale.cpp Make locale code compile on CloudABI. 2015-07-06 15:39:36 +00:00
memory.cpp [libcxx] Add atomic_support.h header to src that handles needed atomic operations. 2015-07-07 00:27:16 +00:00
mutex.cpp [libcxx] Add atomic_support.h header to src that handles needed atomic operations. 2015-07-07 00:27:16 +00:00
new.cpp Fix for LWG Issue 2458: N3778 and new library deallocation signatures. 2015-05-18 17:48:45 +00:00
optional.cpp Add all the relational operators to std::experimental::optional. Also update bad_optional_access to match the Library Fundamentals draft standard. This is not all of the upcoming changes to optional, though. 2014-12-09 14:49:17 +00:00
random.cpp Add support for arc4random() to random_device. 2015-03-10 07:46:06 +00:00
regex.cpp Base regex code on char_class_type. 2014-07-29 19:23:39 +00:00
shared_mutex.cpp Implement N4508: shared_mutex. Reviewed as http://reviews.llvm.org/D10480 2015-06-30 14:04:14 +00:00
stdexcept.cpp Exceptions store the message as reference counted string for 2014-04-30 19:54:11 +00:00
string.cpp Print log/error messages on stderr, not stdout 2015-03-10 07:57:43 +00:00
strstream.cpp Switch to using C++ style casts. 2014-01-04 17:43:00 +00:00
system_error.cpp Fix -Wpessimizing-move warning by remove the call to std::move. 2015-04-30 21:47:28 +00:00
thread.cpp Don't include <sys/sysctl.h> on CloudABI. 2015-03-10 08:01:10 +00:00
typeinfo.cpp Re-add bad_cast and bad_typeid default ctor definitions under libsupc++. 2013-10-03 22:04:10 +00:00
utility.cpp Put std::piecewise_construct_t back into the dylib for ABI stability. When clients are in C++11/constexpr mode this will be safely ignored because piecewise_construct is then declared with internal linkage. 2012-04-03 23:45:46 +00:00
valarray.cpp Revert "Turn off extern templates for most uses." 2014-08-15 17:58:56 +00:00