3 #ifndef __CDS_GC_IMPL_HP_IMPL_H
4 #define __CDS_GC_IMPL_HP_IMPL_H
6 #include <cds/threading/model.h>
7 #include <cds/details/static_functor.h>
10 namespace cds { namespace gc {
12 inline HP::thread_gc::thread_gc(
15 : m_bPersistent( bPersistent )
17 if ( !threading::Manager::isThreadAttached() )
18 threading::Manager::attachThread();
21 inline HP::thread_gc::~thread_gc()
24 cds::threading::Manager::detachThread();
27 inline HP::Guard::Guard() CDS_NOEXCEPT
28 : Guard::base_class( cds::threading::getGC<HP>() )
31 template <size_t COUNT>
32 inline HP::GuardArray<COUNT>::GuardArray() CDS_NOEXCEPT
33 : GuardArray::base_class( cds::threading::getGC<HP>() )
37 inline void HP::retire( T * p, void (* pFunc)(T *) )
39 cds::threading::getGC<HP>().retirePtr( p, pFunc );
42 template <class Disposer, typename T>
43 inline void HP::retire( T * p )
45 cds::threading::getGC<HP>().retirePtr( p, cds::details::static_functor<Disposer, T>::call );
48 inline void HP::scan()
50 cds::threading::getGC<HP>().scan();
53 }} // namespace cds::gc
56 #endif // #ifndef __CDS_GC_IMPL_HP_IMPL_H