3 #ifndef __CDS_GC_IMPL_DHP_IMPL_H
4 #define __CDS_GC_IMPL_DHP_IMPL_H
6 #include <cds/threading/model.h>
9 namespace cds { namespace gc {
15 cds::threading::getGC<DHP>().allocGuard( *this );
18 inline Guard::~Guard()
20 cds::threading::getGC<DHP>().freeGuard( *this );
23 template <size_t Count>
24 inline GuardArray<Count>::GuardArray()
26 cds::threading::getGC<DHP>().allocGuard( *this );
29 template <size_t Count>
30 inline GuardArray<Count>::~GuardArray()
32 cds::threading::getGC<DHP>().freeGuard( *this );
37 inline DHP::thread_gc::thread_gc(
40 : m_bPersistent( bPersistent )
42 if ( !cds::threading::Manager::isThreadAttached() )
43 cds::threading::Manager::attachThread();
46 inline DHP::thread_gc::~thread_gc()
49 cds::threading::Manager::detachThread();
52 inline /*static*/ void DHP::thread_gc::alloc_guard( cds::gc::dhp::details::guard& g )
54 return cds::threading::getGC<DHP>().allocGuard(g);
56 inline /*static*/ void DHP::thread_gc::free_guard( cds::gc::dhp::details::guard& g )
58 cds::threading::getGC<DHP>().freeGuard(g);
61 inline void DHP::scan()
63 cds::threading::getGC<DHP>().scan();
66 }} // namespace cds::gc
69 #endif // #ifndef __CDS_GC_IMPL_DHP_IMPL_H