10 #ifndef __PION_PIONCOUNTER_HEADER__
11 #define __PION_PIONCOUNTER_HEADER__
13 #include <pion/PionConfig.hpp>
14 #include <boost/cstdint.hpp>
15 #include <boost/thread/mutex.hpp>
29 boost::mutex::scoped_lock counter_lock(m_mutex);
35 boost::mutex::scoped_lock counter_lock(m_mutex);
40 template <
typename IntegerType>
41 inline void add(
const IntegerType& n) {
42 boost::mutex::scoped_lock counter_lock(m_mutex);
47 template <
typename IntegerType>
49 boost::mutex::scoped_lock counter_lock(m_mutex);
54 template <
typename IntegerType>
55 inline void assign(
const IntegerType& n) {
56 boost::mutex::scoped_lock counter_lock(m_mutex);
84 template <
typename IntegerType>
88 template <
typename IntegerType>
92 template <
typename IntegerType>
96 template <
typename IntegerType>
100 template <
typename IntegerType>
104 template <
typename IntegerType>
108 template <
typename IntegerType>
112 template <
typename IntegerType>
127 boost::mutex m_mutex;
130 boost::uint64_t m_value;