summaryrefslogtreecommitdiffstats
path: root/libcxx/include/shared_mutex
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Suppress -Wctad-maybe-unsupported on types w/o deduction guides."Eric Fiselier2019-08-041-1/+0
| | | | | | | | | Some modules builds are issuing buggy diagnostics. The cause of which is TBD. This reverts commit r@367770. llvm-svn: 367777
* Suppress -Wctad-maybe-unsupported on types w/o deduction guides.Eric Fiselier2019-08-031-0/+1
| | | | | | | | | | | There are a handful of standard library types that are intended to support CTAD but don't need any explicit deduction guides to do so. This patch adds a dummy deduction guide to those types to suppress -Wctad-maybe-unsupported (which gets emitted in user code). llvm-svn: 367770
* 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
* [libcxx] Provide thread annotations for shared_mutexPetr Hosek2018-11-091-7/+8
| | | | | | | | | | shared_mutex was introduced in C++17 but its implementation currently doesn't use Clang's thread annotations like regular mutex. This change adds those. Differential Revision: https://reviews.llvm.org/D54290 llvm-svn: 346567
* Implement the infrastructure for feature-test macros. Very few actual ↵Marshall Clow2018-09-121-0/+1
| | | | | | feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955 llvm-svn: 342073
* [libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since ↵Louis Dionne2018-08-011-1/+1
| | | | | | | | | | | | | | _LIBCPP_BUILDING_LIBRARY Summary: As suggested by Marshall in https://reviews.llvm.org/D49914 Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50008 llvm-svn: 338475
* [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