diff --git a/CMakeLists.txt b/CMakeLists.txt index db01352..5e271f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,7 @@ if (PHMAP_BUILD_EXAMPLES) add_executable(ex_lazy_emplace_l examples/lazy_emplace_l.cc phmap.natvis) endif() add_executable(ex_serialize examples/serialize.cc phmap.natvis) - target_include_directories(ex_serialize PUBLIC $) + #target_include_directories(ex_serialize PUBLIC $) add_executable(ex_hash_std examples/hash_std.cc phmap.natvis) add_executable(ex_hash_value examples/hash_value.cc phmap.natvis) add_executable(ex_hash examples/hash.cc phmap.natvis) diff --git a/parallel_hashmap/phmap_base.h b/parallel_hashmap/phmap_base.h index ffd7cd8..1541e35 100644 --- a/parallel_hashmap/phmap_base.h +++ b/parallel_hashmap/phmap_base.h @@ -4869,12 +4869,12 @@ public: struct AbslMutex : protected absl::Mutex { - void lock() { this->Lock(); } - void unlock() { this->Unlock(); } - void try_lock() { this->TryLock(); } - void lock_shared() { this->ReaderLock(); } - void unlock_shared() { this->ReaderUnlock(); } - void try_lock_shared() { this->ReaderTryLock(); } + void lock() ABSL_EXCLUSIVE_LOCK_FUNCTION() { this->Lock(); } + void unlock() ABSL_UNLOCK_FUNCTION() { this->Unlock(); } + void try_lock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true) { this->TryLock(); } + void lock_shared() ABSL_SHARED_LOCK_FUNCTION() { this->ReaderLock(); } + void unlock_shared() ABSL_UNLOCK_FUNCTION() { this->ReaderUnlock(); } + void try_lock_shared() ABSL_SHARED_TRYLOCK_FUNCTION(true) { this->ReaderTryLock(); } }; template <> @@ -4898,7 +4898,6 @@ public: // -------------------------------------------------------------------------- #ifdef BOOST_THREAD_SHARED_MUTEX_HPP -#if 1 // --------------------------------------------------------------------------- template <> class LockableImpl : public boost::shared_mutex @@ -4913,21 +4912,6 @@ public: using UniqueLocks = typename Base::WriteLocks; using UpgradeToUnique = typename Base::DoNothing; // we already have unique ownership }; -#else - // --------------------------------------------------------------------------- - template <> - class LockableImpl : public boost::upgrade_mutex - { - public: - using mutex_type = boost::upgrade_mutex; - using SharedLock = boost::shared_lock; - using UpgradeLock = boost::upgrade_lock; - using UniqueLock = boost::unique_lock; - using SharedLocks = typename Base::ReadLocks; - using UniqueLocks = typename Base::WriteLocks; - using UpgradeToUnique = boost::upgrade_to_unique_lock; - }; -#endif #endif // BOOST_THREAD_SHARED_MUTEX_HPP