summaryrefslogtreecommitdiffstats
path: root/libcxx/include/shared_mutex
Commit message (Collapse)AuthorAgeFilesLines
* [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on WindowsEric Fiselier2017-05-311-2/+6
| | | | | | | | | | | | | | | | Summary: This patch improves how libc++ handles min/max macros within the headers. Previously libc++ would undef them and emit a warning. This patch changes libc++ to use `#pragma push_macro` to save the macro before undefining it, and `#pragma pop_macro` to restore the macros and the end of the header. Reviewers: mclow.lists, bcraig, compnerd, EricWF Reviewed By: EricWF Subscribers: cfe-commits, krytarowski Differential Revision: https://reviews.llvm.org/D33080 llvm-svn: 304357
* Fix shared_mutex dll import errors on WindowsEric Fiselier2017-05-081-1/+1
| | | | llvm-svn: 302394
* Add markup for libc++ dylib availabilityMehdi Amini2017-05-041-3/+3
| | | | | | | | | | | | | | | Libc++ is used as a system library on macOS and iOS (amongst others). In order for users to be able to compile a binary that is intended to be deployed to an older version of the platform, clang provides the availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_ that can be placed on declarations to describe the lifecycle of a symbol in the library. See docs/DesignDocs/AvailabilityMarkup.rst for more information. Differential Revision: https://reviews.llvm.org/D31739 llvm-svn: 302172
* Implement Pp0156r2: 'Variadic Lock Guard, version 5' Reviewed as ↵Marshall Clow2017-03-241-2/+2
| | | | | | https://reviews.llvm.org/D31163. llvm-svn: 298681
* [libc++] Make _LIBCPP_TYPE_VIS export membersShoaib Meenai2017-03-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Most classes annotated with _LIBCPP_TYPE_VIS need to have at least some of their members exported, otherwise we have a lot of link errors when linking against a libc++ built with hidden visibility. This also makes _LIBCPP_TYPE_VIS be consistent across platforms, since on Windows it already exports members. With this change made, any template methods of a class marked _LIBCPP_TYPE_VIS will also get default visibility when instantiatied, which is not desirable for clients of libc++ headers who wish to control their visibility; this is the same issue as PR30642. Annotate all problematic methods with an explicit visibility specifier to avoid this. The problematic methods were found by running bad-visibility-finder [1] against the libc++ headers after making the _LIBCPP_TYPE_VIS change. The small methods were marked for inlining; the larger ones hidden. [1] https://github.com/smeenai/bad-visibility-finder Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25208 llvm-svn: 296732
* Qualify calls to addressof to avoid getting ADL. Fixes PR#27254.Marshall Clow2016-04-131-6/+6
| | | | llvm-svn: 266209
* Implement LWG2577: {shared,unique}_lock</tt> should use std::addressofMarshall Clow2016-03-141-6/+6
| | | | llvm-svn: 263506
* Implement N4508: shared_mutex. Reviewed as http://reviews.llvm.org/D10480Marshall Clow2015-06-301-19/+94
| | | | llvm-svn: 241067
* [libcxx] Fix bug in shared_timed_mutex that could cause a program to hang.Eric Fiselier2015-04-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The summary of the bug, provided by Stephan T. Lavavej: In shared_timed_mutex::try_lock_until() (line 195 in 3.6.0), you need to deliver a notification. The scenario is: * There are N threads holding the shared lock. * One thread calls try_lock_until() to attempt to acquire the exclusive lock. It sets the "I want to write" bool/bit, then waits for the N readers to drain away. * K more threads attempt to acquire the shared lock, but they notice that someone said "I want to write", so they block on a condition_variable. * At least one of the N readers is stubborn and doesn't release the shared lock. * The wannabe-writer times out, gives up, and unsets the "I want to write" bool/bit. At this point, a notification (it needs to be notify_all) must be delivered to the condition_variable that the K wannabe-readers are waiting on. Otherwise, they can block forever without waking up. Reviewers: mclow.lists, jyasskin Reviewed By: jyasskin Subscribers: jyasskin, cfe-commits Differential Revision: http://reviews.llvm.org/D8796 llvm-svn: 233944
* Allow libc++ to be built on systems without POSIX threadsJonathan Roelofs2014-09-051-0/+6
| | | | | | | | | | 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
* Replace 'noexcept' with '_NOEXCEPT' in <shared_mutex>. This allows us to ↵Marshall Clow2014-08-251-10/+10
| | | | | | build the dylib with MSVC, which doesn't support noexcept (sheesh\!). Thanks to K-ballo for the report. llvm-svn: 216384
* Implement N3891: A proposal to rename shared_mutex to shared_timed_mutexDavid Majnemer2014-03-171-12/+12
| | | | | | | | | | This is as straightforward as it sounds, a renamed from shared_mutex to shared_timed_mutex. Note that libcxx .dylib and .so files built with c++14 support need to be rebuilt. llvm-svn: 204078
* N3659: Shared locking in C++ Revision 2, c++1y onlyHoward Hinnant2013-09-211-0/+419
llvm-svn: 191127
OpenPOWER on IntegriCloud