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 {
11 inline DHP::thread_gc::thread_gc(
14 : m_bPersistent( bPersistent )
16 if ( !cds::threading::Manager::isThreadAttached() )
17 cds::threading::Manager::attachThread();
20 inline DHP::thread_gc::~thread_gc()
23 cds::threading::Manager::detachThread();
26 inline /*static*/ void DHP::thread_gc::alloc_guard( cds::gc::dhp::details::guard& g )
28 return cds::threading::getGC<DHP>().allocGuard(g);
30 inline /*static*/ void DHP::thread_gc::free_guard( cds::gc::dhp::details::guard& g )
32 cds::threading::getGC<DHP>().freeGuard(g);
35 inline DHP::Guard::Guard()
36 : Guard::base_class( cds::threading::getGC<DHP>() )
39 template <size_t Count>
40 inline DHP::GuardArray<Count>::GuardArray()
41 : GuardArray::base_class( cds::threading::getGC<DHP>() )
44 inline void DHP::scan()
46 cds::threading::getGC<DHP>().scan();
49 }} // namespace cds::gc
52 #endif // #ifndef __CDS_GC_IMPL_DHP_IMPL_H