|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r52037 - sandbox/synchro/libs/synchro/test
From: vicente.botet_at_[hidden]
Date: 2009-03-28 14:05:25
Author: viboes
Date: 2009-03-28 14:05:25 EDT (Sat, 28 Mar 2009)
New Revision: 52037
URL: http://svn.boost.org/trac/boost/changeset/52037
Log:
0.3.1 : Usage of Boost/Chrono + free functions for conditional lockables
Text files modified:
sandbox/synchro/libs/synchro/test/lockable_concepts_test.cpp | 3 ++-
sandbox/synchro/libs/synchro/test/locker_concepts_test.cpp | 2 ++
sandbox/synchro/libs/synchro/test/nested_reverse_locker_test.cpp | 4 ++--
sandbox/synchro/libs/synchro/test/test_generic_locks.cpp | 6 +++---
4 files changed, 9 insertions(+), 6 deletions(-)
Modified: sandbox/synchro/libs/synchro/test/lockable_concepts_test.cpp
==============================================================================
--- sandbox/synchro/libs/synchro/test/lockable_concepts_test.cpp (original)
+++ sandbox/synchro/libs/synchro/test/lockable_concepts_test.cpp 2009-03-28 14:05:25 EDT (Sat, 28 Mar 2009)
@@ -76,16 +76,17 @@
BOOST_CONCEPT_ASSERT((ShareLockableConcept<boost::shared_mutex>));
BOOST_CONCEPT_ASSERT((UpgradeLockableConcept<boost::shared_mutex>));
-#if 0
BOOST_CONCEPT_ASSERT((LockableConcept<interprocess_mutex>));
BOOST_CONCEPT_ASSERT((TimedLockableConcept<synchro::interprocess_mutex>));
+
BOOST_CONCEPT_ASSERT((LockableConcept<synchro::interprocess_recursive_mutex>));
BOOST_CONCEPT_ASSERT((TimedLockableConcept<synchro::interprocess_recursive_mutex>));
BOOST_CONCEPT_ASSERT((LockableConcept<synchro::named_mutex>));
BOOST_CONCEPT_ASSERT((TimedLockableConcept<synchro::named_mutex>));
+#if 0
BOOST_CONCEPT_ASSERT((LockableConcept<synchro::interprocess_upgradable_mutex>));
BOOST_CONCEPT_ASSERT((TimedLockableConcept<synchro::interprocess_upgradable_mutex>));
BOOST_CONCEPT_ASSERT((ShareLockableConcept<synchro::interprocess_upgradable_mutex>));
Modified: sandbox/synchro/libs/synchro/test/locker_concepts_test.cpp
==============================================================================
--- sandbox/synchro/libs/synchro/test/locker_concepts_test.cpp (original)
+++ sandbox/synchro/libs/synchro/test/locker_concepts_test.cpp 2009-03-28 14:05:25 EDT (Sat, 28 Mar 2009)
@@ -53,6 +53,7 @@
BOOST_CONCEPT_ASSERT((SharedLockerConcept<upgrade_locker<thread_shared_mutex> >));
BOOST_CONCEPT_ASSERT((UpgradeLockerConcept<upgrade_locker<thread_shared_mutex> >));
+#if 0
BOOST_CONCEPT_ASSERT((LockerConcept<unique_locker<interprocess_mutex> >));
BOOST_CONCEPT_ASSERT((TimedLockerConcept<unique_locker<interprocess_mutex> >));
BOOST_CONCEPT_ASSERT((UniqueLockerConcept<unique_locker<interprocess_mutex> >));
@@ -68,6 +69,7 @@
BOOST_CONCEPT_ASSERT((UniqueLockerConcept<upgrade_locker<interprocess_upgradable_mutex> >));
BOOST_CONCEPT_ASSERT((SharedLockerConcept<upgrade_locker<interprocess_upgradable_mutex> >));
BOOST_CONCEPT_ASSERT((UpgradeLockerConcept<upgrade_locker<interprocess_upgradable_mutex> >));
+#endif
#if 0
BOOST_CONCEPT_ASSERT((LockableConcept<exclusive_lockable_adapter<null_mutex> >));
Modified: sandbox/synchro/libs/synchro/test/nested_reverse_locker_test.cpp
==============================================================================
--- sandbox/synchro/libs/synchro/test/nested_reverse_locker_test.cpp (original)
+++ sandbox/synchro/libs/synchro/test/nested_reverse_locker_test.cpp 2009-03-28 14:05:25 EDT (Sat, 28 Mar 2009)
@@ -89,9 +89,9 @@
}
{
typedef const try_unique_locker<thread_mutex> &try_locker;
- thread_mutex mtx;
+ boost::mutex mtx;
bool res=false;
- try_unique_locker<thread_mutex> locker(mtx);
+ try_unique_locker<boost::mutex> locker(mtx);
if (locker) {
res=true;
std::cout << "try_unique_locker:OK=" << std::endl;
Modified: sandbox/synchro/libs/synchro/test/test_generic_locks.cpp
==============================================================================
--- sandbox/synchro/libs/synchro/test/test_generic_locks.cpp (original)
+++ sandbox/synchro/libs/synchro/test/test_generic_locks.cpp 2009-03-28 14:05:25 EDT (Sat, 28 Mar 2009)
@@ -89,7 +89,7 @@
}
#if 0
- bool timed_lock(::boost::system_time const& absolute_time)
+ bool timed_lock(boost::chrono::system_clock::time_point const& absolute_time)
{
if(is_locked)
{
@@ -222,8 +222,8 @@
void lock_pair(boost::synchro::thread_mutex* m1,boost::synchro::thread_mutex* m2)
{
boost::synchro::lockables::lock(*m1,*m2);
- boost::synchro::unique_locker<boost::synchro::thread_mutex> l1(*m1,boost::adopt_lock),
- l2(*m2,boost::adopt_lock);
+ boost::synchro::unique_locker<boost::synchro::thread_mutex> l1(*m1,boost::synchro::adopt_lock),
+ l2(*m2,boost::synchro::adopt_lock);
}
void test_lock_two_other_thread_locks_in_order()
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk