Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSUNIT_MAP_TYPE_H
namespace cc = cds::container;
namespace co = cds::opt;
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_gpi;
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_gpb;
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_gpt;
+ typedef cds::urcu::gc< cds::urcu::general_instant_stripped > rcu_gpi;
+ typedef cds::urcu::gc< cds::urcu::general_buffered_stripped > rcu_gpb;
+ typedef cds::urcu::gc< cds::urcu::general_threaded_stripped > rcu_gpt;
#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_shb;
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_sht;
+ typedef cds::urcu::gc< cds::urcu::signal_buffered_stripped > rcu_shb;
+ typedef cds::urcu::gc< cds::urcu::signal_threaded_stripped > rcu_sht;
#endif
template <typename Key>
template <typename Key>
struct hash;
-#define CDSUNIT_INT_COMPARE(t) template <> struct cmp<t> { int operator()( t k1, t k2 ){ return (int)(k1 - k2); } }
+#define CDSUNIT_INT_COMPARE(t) template <> struct cmp<t> { int operator()( t k1, t k2 ) const { return (int)(k1 - k2); } }
CDSUNIT_INT_COMPARE(char);
CDSUNIT_INT_COMPARE(unsigned char);
CDSUNIT_INT_COMPARE(int);
CDSUNIT_INT_COMPARE(unsigned long long);
#undef CDSUNIT_INT_COMPARE
-#define CDSUNIT_INT_LESS(t) template <> struct less<t> { bool operator()( t k1, t k2 ){ return k1 < k2; } }
+#define CDSUNIT_INT_LESS(t) template <> struct less<t> { bool operator()( t k1, t k2 ) const { return k1 < k2; } }
CDSUNIT_INT_LESS( char );
CDSUNIT_INT_LESS( unsigned char );
CDSUNIT_INT_LESS( int );
return seed;
}
};
-
};
+ struct empty_stat {};
+ static inline cds_test::property_stream& operator <<( cds_test::property_stream& o, empty_stat const& )
+ {
+ return o;
+ }
+
template <typename Map>
- static inline void print_stat( cds_test::property_stream&, Map const& /*m*/ )
- {}
+ static inline void print_stat( cds_test::property_stream& o, Map const& m )
+ {
+ o << m.statistics();
+ }
+
template <typename Map>
static inline void check_before_cleanup( Map& /*m*/ )