Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libcxx/include/__configuration/availability.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@
#define _LIBCPP_AVAILABILITY_HAS_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE _LIBCPP_INTRODUCED_IN_LLVM_21
// No attribute, since we've had bad_function_call::what() in the headers before

// This controls whether we assume that __shared_mutex_base::~__shared_mutex_base() is defined in the dylib.
// Defining that function in the dylib provides additional flexibility for changing the representation of the
// class, which may eventually be used to provide a better implementation.
#define _LIBCPP_AVAILABILITY_HAS_SHARED_MUTEX_BASE_DESTRUCTOR _LIBCPP_INTRODUCED_IN_LLVM_21
// No attribute, since we define the destructor in the headers otherwise

// Define availability attributes that depend on both
// _LIBCPP_HAS_EXCEPTIONS and _LIBCPP_HAS_RTTI.
#if !_LIBCPP_HAS_EXCEPTIONS || !_LIBCPP_HAS_RTTI
Expand Down
4 changes: 4 additions & 0 deletions libcxx/include/shared_mutex
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ struct _LIBCPP_EXPORTED_FROM_ABI __shared_mutex_base {
static const unsigned __n_readers_ = ~__write_entered_;

__shared_mutex_base();
# if defined(_LIBCPP_BUILDING_LIBRARY) || _LIBCPP_AVAILABILITY_HAS_SHARED_MUTEX_BASE_DESTRUCTOR
~__shared_mutex_base();
# else
_LIBCPP_HIDE_FROM_ABI ~__shared_mutex_base() = default;
# endif

__shared_mutex_base(const __shared_mutex_base&) = delete;
__shared_mutex_base& operator=(const __shared_mutex_base&) = delete;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,8 @@
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base8try_lockEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count10__add_weakEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count14__release_weakEv', 'type': 'FUNC'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,8 @@
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_base8try_lockEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_baseC1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_baseC2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_baseD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_baseD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_weak_count10__add_weakEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_weak_count14__release_weakEv', 'type': 'FUNC'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count4lockEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_weak_countD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count4lockEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119__shared_weak_countD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,8 @@
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_base8try_lockEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseC2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_mutex_baseD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count10__add_weakEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__119__shared_weak_count14__release_weakEv', 'type': 'FUNC'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,8 @@
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_base8try_lockEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_baseC1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_baseC2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_baseD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_mutex_baseD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_weak_count10__add_weakEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt6__ndk119__shared_weak_count14__release_weakEv', 'type': 'FUNC'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,8 @@
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count10__add_weakEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'type': 'FUNC'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,8 @@
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count10__add_weakEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'type': 'FUNC'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,8 @@
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_base8try_lockEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseC2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_mutex_baseD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count10__add_weakEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count12__add_sharedEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__119__shared_weak_count14__release_weakEv', 'type': 'FUNC'}
Expand Down
1 change: 1 addition & 0 deletions libcxx/src/shared_mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD

// Shared Mutex Base
__shared_mutex_base::__shared_mutex_base() : __state_(0) {}
__shared_mutex_base::~__shared_mutex_base() {}

// Exclusive ownership

Expand Down
Loading