mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
Replace dependency on SmartPtr with primitives in Core
This commit is contained in:
@ -22,7 +22,6 @@ target_link_libraries(boost_unordered
|
|||||||
Boost::mp11
|
Boost::mp11
|
||||||
Boost::predef
|
Boost::predef
|
||||||
Boost::preprocessor
|
Boost::preprocessor
|
||||||
Boost::smart_ptr
|
|
||||||
Boost::static_assert
|
Boost::static_assert
|
||||||
Boost::throw_exception
|
Boost::throw_exception
|
||||||
Boost::tuple
|
Boost::tuple
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/smart_ptr/detail/sp_thread_pause.hpp>
|
#include <boost/core/yield_primitives.hpp>
|
||||||
#include <boost/smart_ptr/detail/sp_thread_sleep.hpp>
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
@ -64,10 +63,10 @@ public:
|
|||||||
if( state_.compare_exchange_weak( st, newst, std::memory_order_acquire, std::memory_order_relaxed ) ) return;
|
if( state_.compare_exchange_weak( st, newst, std::memory_order_acquire, std::memory_order_relaxed ) ) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::detail::sp_thread_pause();
|
boost::core::sp_thread_pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::detail::sp_thread_sleep();
|
boost::core::sp_thread_sleep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +131,7 @@ public:
|
|||||||
state_.compare_exchange_weak( st, newst, std::memory_order_relaxed, std::memory_order_relaxed );
|
state_.compare_exchange_weak( st, newst, std::memory_order_relaxed, std::memory_order_relaxed );
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::detail::sp_thread_pause();
|
boost::core::sp_thread_pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear writer pending bit before going to sleep
|
// clear writer pending bit before going to sleep
|
||||||
@ -169,7 +168,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::detail::sp_thread_sleep();
|
boost::core::sp_thread_sleep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ move
|
|||||||
mp11
|
mp11
|
||||||
predef
|
predef
|
||||||
preprocessor
|
preprocessor
|
||||||
smart_ptr
|
|
||||||
static_assert
|
static_assert
|
||||||
throw_exception
|
throw_exception
|
||||||
tuple
|
tuple
|
||||||
|
Reference in New Issue
Block a user