diff options
Diffstat (limited to 'gruel/src/lib/pmt/pmt_int.h')
-rw-r--r-- | gruel/src/lib/pmt/pmt_int.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gruel/src/lib/pmt/pmt_int.h b/gruel/src/lib/pmt/pmt_int.h index 9aac322a7..ba865b418 100644 --- a/gruel/src/lib/pmt/pmt_int.h +++ b/gruel/src/lib/pmt/pmt_int.h @@ -24,6 +24,7 @@ #include <gruel/pmt.h> #include <boost/utility.hpp> +#include <boost/detail/atomic_count.hpp> /* * EVERYTHING IN THIS FILE IS PRIVATE TO THE IMPLEMENTATION! @@ -35,8 +36,10 @@ namespace pmt { class pmt_base : boost::noncopyable { + mutable boost::detail::atomic_count count_; + protected: - pmt_base(){}; + pmt_base() : count_(0) {}; virtual ~pmt_base(); public: @@ -66,6 +69,9 @@ public: virtual bool is_c32vector() const { return false; } virtual bool is_c64vector() const { return false; } + friend void intrusive_ptr_add_ref(pmt_base* p); + friend void intrusive_ptr_release(pmt_base* p); + # if (PMT_LOCAL_ALLOCATOR) void *operator new(size_t); void operator delete(void *, size_t); |