|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57227 - in sandbox/stm/branches/vbe: boost/stm boost/stm/latm boost/stm/synch libs/stm/src libs/stm/test
From: vicente.botet_at_[hidden]
Date: 2009-10-29 11:58:03
Author: viboes
Date: 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
New Revision: 57227
URL: http://svn.boost.org/trac/boost/changeset/57227
Log:
TBoost.STM vbe:
* Separating internal Mutex from latm mutex_type
* Some test pass now when BOOST_STM_USE_BOOST_MUTEX is defined (boost::mutex as internal Mutex). The others fails because a latm::mutex_type is locked twice by the same thread.
Text files modified:
sandbox/stm/branches/vbe/boost/stm/datatypes.hpp | 6 +++---
sandbox/stm/branches/vbe/boost/stm/latm/base_mode.hpp | 3 ++-
sandbox/stm/branches/vbe/boost/stm/latm/datatypes.hpp | 4 +++-
sandbox/stm/branches/vbe/boost/stm/latm/full_mode.hpp | 2 +-
sandbox/stm/branches/vbe/boost/stm/synch/auto_lock.hpp | 25 +++++++++++++------------
sandbox/stm/branches/vbe/boost/stm/transaction.hpp | 12 ++++++------
sandbox/stm/branches/vbe/libs/stm/src/transaction.cpp | 5 ++++-
sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx.cpp | 4 ++--
sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx2.cpp | 8 ++++----
sandbox/stm/branches/vbe/libs/stm/test/isolatedIntLockInTx.cpp | 4 ++--
sandbox/stm/branches/vbe/libs/stm/test/litExample.cpp | 16 ++++++++--------
sandbox/stm/branches/vbe/libs/stm/test/lotExample.cpp | 20 ++++++++++----------
sandbox/stm/branches/vbe/libs/stm/test/main.h | 2 +-
sandbox/stm/branches/vbe/libs/stm/test/nestedTxs.cpp | 16 ++++++++--------
sandbox/stm/branches/vbe/libs/stm/test/stm.cpp | 4 ++--
sandbox/stm/branches/vbe/libs/stm/test/testHT_latm.h | 2 +-
sandbox/stm/branches/vbe/libs/stm/test/testHashMapWithLocks.h | 2 +-
sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.h | 4 ++--
sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.h | 4 ++--
sandbox/stm/branches/vbe/libs/stm/test/txLinearLock.cpp | 8 ++++----
sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.cpp | 16 ++++++++--------
sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.h | 4 ++--
22 files changed, 89 insertions(+), 82 deletions(-)
Modified: sandbox/stm/branches/vbe/boost/stm/datatypes.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/stm/datatypes.hpp (original)
+++ sandbox/stm/branches/vbe/boost/stm/datatypes.hpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -140,12 +140,12 @@
}}
#ifndef BOOST_STM_USE_BOOST_MUTEX
- typedef pthread_mutex_t Mutex;
+ typedef pthread_mutex_t Mutex;
+ //typedef pthread_mutex_t PLOCK;
#else
- typedef boost::mutex Mutex;
+ typedef boost::mutex Mutex;
#endif
-typedef pthread_mutex_t PLOCK;
#endif // BOOST_STM_DATATYPES__HPP
Modified: sandbox/stm/branches/vbe/boost/stm/latm/base_mode.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/stm/latm/base_mode.hpp (original)
+++ sandbox/stm/branches/vbe/boost/stm/latm/base_mode.hpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -16,6 +16,7 @@
#include <boost/stm/detail/config.hpp>
#include <boost/stm/latm/datatypes.hpp>
+#include <boost/stm/datatypes.hpp>
#include <boost/synchro.hpp>
namespace boost { namespace stm { namespace latm {
@@ -28,7 +29,7 @@
latm::mutex_thread_id_set_map latmLockedLocksAndThreadIdsMap_;
latm::mutex_thread_id_map latmLockedLocksOfThreadMap_;
- mutex_type latmMutex_;
+ Mutex latmMutex_;
latm::mutex_set get_tm_conflicting_locks() { return tmConflictingLocks_; }
Modified: sandbox/stm/branches/vbe/boost/stm/latm/datatypes.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/stm/latm/datatypes.hpp (original)
+++ sandbox/stm/branches/vbe/boost/stm/latm/datatypes.hpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -20,6 +20,8 @@
#include <map>
#if BOOST_STM_LATM_GENERIC
#include <boost/stm/synchro/poly/lock.hpp>
+#else
+#include <pthread.h>
#endif
namespace boost { namespace stm { namespace latm {
@@ -27,7 +29,7 @@
#if BOOST_STM_LATM_GENERIC
typedef boost::synchro::poly::exclusive_lock mutex_type;
#else
- typedef Mutex mutex_type;
+ typedef pthread_mutex_t mutex_type;
#endif
typedef std::set<thread_id_t> thread_id_set;
Modified: sandbox/stm/branches/vbe/boost/stm/latm/full_mode.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/stm/latm/full_mode.hpp (original)
+++ sandbox/stm/branches/vbe/boost/stm/latm/full_mode.hpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -66,7 +66,7 @@
}
//-----------------------------------------------------------------------------
- void tm_lock_conflict(Mutex &lock)
+ void tm_lock_conflict(latm::mutex_type &lock)
{
tm_lock_conflict(&lock);
}
Modified: sandbox/stm/branches/vbe/boost/stm/synch/auto_lock.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/stm/synch/auto_lock.hpp (original)
+++ sandbox/stm/branches/vbe/boost/stm/synch/auto_lock.hpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -28,6 +28,7 @@
#include <boost/stm/datatypes.hpp>
#ifdef PERFORMING_LATM
#include <boost/stm/transaction.hpp>
+#include <boost/stm/latm.hpp>
#else
#endif
//---------------------------------------------------------------------------
@@ -67,27 +68,27 @@
class auto_lock
{
public:
- typedef std::pair<thread_id_t const, Mutex*> ThreadedLockPair;
- typedef std::multimap<thread_id_t const, Mutex*> ThreadedLockContainer;
+ typedef std::pair<thread_id_t const, latm::mutex_type*> ThreadedLockPair;
+ typedef std::multimap<thread_id_t const, latm::mutex_type*> ThreadedLockContainer;
typedef ThreadedLockContainer::iterator ThreadedLockIter;
- auto_lock(Mutex &mutex) : hasLock_(false), lock_(0)
+ auto_lock(latm::mutex_type &mutex) : hasLock_(false), lock_(0)
{
do_auto_lock(&mutex);
}
- auto_lock(Mutex *mutex) : hasLock_(false), lock_(0)
+ auto_lock(latm::mutex_type *mutex) : hasLock_(false), lock_(0)
{
do_auto_lock(mutex);
}
- auto_lock(milliseconds_t timeOut, Mutex &mutex) : hasLock_(false), lock_(0)
+ auto_lock(milliseconds_t timeOut, latm::mutex_type &mutex) : hasLock_(false), lock_(0)
{
do_timed_auto_lock(timeOut, &mutex);
}
- auto_lock(milliseconds_t timeOut, Mutex *mutex) : hasLock_(false), lock_(0)
+ auto_lock(milliseconds_t timeOut, latm::mutex_type *mutex) : hasLock_(false), lock_(0)
{
do_timed_auto_lock(timeOut, mutex);
}
@@ -106,7 +107,7 @@
private:
- void do_timed_auto_lock(milliseconds_t timeOut, Mutex *mutex)
+ void do_timed_auto_lock(milliseconds_t timeOut, latm::mutex_type *mutex)
{
lock_ = mutex;
@@ -127,13 +128,13 @@
throw timer_lock_exception( "lock timed out" );
}
- void insert_into_threaded_lock_map(Mutex* mutex)
+ void insert_into_threaded_lock_map(latm::mutex_type* mutex)
{
synchro::lock_guard<Mutex> lock_i(*global_lock());
threaded_locks().insert(ThreadedLockPair(this_thread::get_id(), mutex));
}
- void do_auto_lock(Mutex *mutex)
+ void do_auto_lock(latm::mutex_type *mutex)
{
lock_ = mutex;
if (thread_has_lock(mutex)) return;
@@ -154,7 +155,7 @@
}
}
- bool thread_has_lock(Mutex *rhs)
+ bool thread_has_lock(latm::mutex_type *rhs)
{
synchro::lock_guard<Mutex> lock_g(*global_lock());
@@ -170,7 +171,7 @@
return false;
}
- void remove_thread_has_lock(Mutex *rhs)
+ void remove_thread_has_lock(latm::mutex_type *rhs)
{
synchro::lock_guard<Mutex> lock_g(*global_lock());
@@ -205,7 +206,7 @@
//auto_lock& operator=(auto_lock const &);
bool hasLock_;
- Mutex *lock_;
+ latm::mutex_type *lock_;
};
//---------------------------------------------------------------------------
Modified: sandbox/stm/branches/vbe/boost/stm/transaction.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/stm/transaction.hpp (original)
+++ sandbox/stm/branches/vbe/boost/stm/transaction.hpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -322,7 +322,7 @@
//--------------------------------------------------------------------------
#if PERFORMING_LATM
//--------------------------------------------------------------------------
- inline static void tm_lock_conflict(Mutex &lock)
+ inline static void tm_lock_conflict(latm::mutex_type &lock)
{
tm_lock_conflict(&lock);
}
@@ -337,13 +337,13 @@
#if USING_TRANSACTION_SPECIFIC_LATM
void see_if_tx_must_block_due_to_tx_latm();
- inline void lock_conflict(Mutex &lock)
+ inline void lock_conflict(latm::mutex_type &lock)
{ add_tx_conflicting_lock(&lock); }
inline void lock_conflict(latm::mutex_type* lock)
{ add_tx_conflicting_lock(lock); }
- inline void add_tx_conflicting_lock(Mutex &lock)
+ inline void add_tx_conflicting_lock(latm::mutex_type &lock)
{
add_tx_conflicting_lock(&lock);
}
@@ -717,9 +717,9 @@
void unlock_tx();
//inline static latm_mutex* latm_lock() { return &latmMutex_; }
- inline static latm::mutex_type* latm_lock() { return &latm::instance().latmMutex_; }
- inline static PLOCK* general_lock() { return &transactionMutex_; }
- inline static PLOCK* inflight_lock() { return &transactionsInFlightMutex_; }
+ inline static Mutex* latm_lock() { return &latm::instance().latmMutex_; }
+ inline static Mutex* general_lock() { return &transactionMutex_; }
+ inline static Mutex* inflight_lock() { return &transactionsInFlightMutex_; }
bool irrevocableTxInFlight();
bool isolatedTxInFlight();
Modified: sandbox/stm/branches/vbe/libs/stm/src/transaction.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/src/transaction.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/src/transaction.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -22,8 +22,11 @@
namespace boost { namespace stm {
namespace non_tx {
std::map<void*, base_transaction_object*> detail::cache_map::map_;
+#ifndef BOOST_STM_USE_BOOST_MUTEX
Mutex detail::cache_map::mtx_=PTHREAD_MUTEX_INITIALIZER;
-
+#else
+ Mutex detail::cache_map::mtx_;
+#endif
}
synchro::implicit_thread_specific_ptr<transaction::transaction_tss_storage> transaction::transaction_tss_storage_;
Modified: sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -37,9 +37,9 @@
static boost::stm::native_trans<int> gInt;
#ifndef BOOST_STM_USE_BOOST_MUTEX
-static Mutex lock1 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type lock1 = PTHREAD_MUTEX_INITIALIZER;
#else
-static Mutex lock1;
+static boost::stm::latm::mutex_type lock1;
#endif
////////////////////////////////////////////////////////////////////////////
using namespace std; using namespace boost::stm;
Modified: sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx2.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx2.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx2.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -38,11 +38,11 @@
static boost::stm::native_trans<int> gInt;
static boost::stm::native_trans<int> gInt2;
#ifndef BOOST_STM_USE_BOOST_MUTEX
-static Mutex lock1 = PTHREAD_MUTEX_INITIALIZER;
-//static Mutex lock2 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type lock1 = PTHREAD_MUTEX_INITIALIZER;
+//static boost::stm::latm::mutex_type lock2 = PTHREAD_MUTEX_INITIALIZER;
#else
-static Mutex lock1;
-//static Mutex lock2;
+static boost::stm::latm::mutex_type lock1;
+//static boost::stm::latm::mutex_type lock2;
#endif
////////////////////////////////////////////////////////////////////////////
using namespace std; using namespace boost::stm;
Modified: sandbox/stm/branches/vbe/libs/stm/test/isolatedIntLockInTx.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/isolatedIntLockInTx.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/isolatedIntLockInTx.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -38,9 +38,9 @@
static boost::stm::native_trans<int> gInt;
static boost::stm::native_trans<int> gInt2;
#ifndef BOOST_STM_USE_BOOST_MUTEX
-static Mutex lock1 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type lock1 = PTHREAD_MUTEX_INITIALIZER;
#else
-static Mutex lock1;
+static boost::stm::latm::mutex_type lock1;
#endif
////////////////////////////////////////////////////////////////////////////
using namespace std; using namespace boost::stm;
Modified: sandbox/stm/branches/vbe/libs/stm/test/litExample.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/litExample.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/litExample.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -36,15 +36,15 @@
#include "main.h"
#ifndef BOOST_STM_USE_BOOST_MUTEX
-static Mutex L2 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L3 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L4 = PTHREAD_MUTEX_INITIALIZER;
-//static Mutex L8 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L2 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L3 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L4 = PTHREAD_MUTEX_INITIALIZER;
+//static boost::stm::latm::mutex_type L8 = PTHREAD_MUTEX_INITIALIZER;
#else
-static Mutex L2;
-static Mutex L3;
-static Mutex L4;
-//static Mutex L8;
+static boost::stm::latm::mutex_type L2;
+static boost::stm::latm::mutex_type L3;
+static boost::stm::latm::mutex_type L4;
+//static boost::stm::latm::mutex_type L8;
#endif
////////////////////////////////////////////////////////////////////////////
using namespace std; using namespace boost::stm;
Modified: sandbox/stm/branches/vbe/libs/stm/test/lotExample.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/lotExample.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/lotExample.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -37,18 +37,18 @@
#ifndef BOOST_STM_USE_BOOST_MUTEX
-static Mutex L1 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L2 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L3 = PTHREAD_MUTEX_INITIALIZER;
-//static Mutex L8 = PTHREAD_MUTEX_INITIALIZER;
-//static Mutex L9 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L1 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L2 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L3 = PTHREAD_MUTEX_INITIALIZER;
+//static boost::stm::latm::mutex_type L8 = PTHREAD_MUTEX_INITIALIZER;
+//static boost::stm::latm::mutex_type L9 = PTHREAD_MUTEX_INITIALIZER;
#else
-static Mutex L1;
-static Mutex L2;
-static Mutex L3;
-//static Mutex L8;
-//static Mutex L9;
+static boost::stm::latm::mutex_type L1;
+static boost::stm::latm::mutex_type L2;
+static boost::stm::latm::mutex_type L3;
+//static boost::stm::latm::mutex_type L8;
+//static boost::stm::latm::mutex_type L9;
#endif
////////////////////////////////////////////////////////////////////////////
Modified: sandbox/stm/branches/vbe/libs/stm/test/main.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/main.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/main.h 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -51,7 +51,7 @@
class String;
class Integer;
-extern Mutex outputMutex;
+extern boost::stm::latm::mutex_type outputMutex;
extern String globalString;
extern boost::stm::native_trans<int> threadsFinished;
Modified: sandbox/stm/branches/vbe/libs/stm/test/nestedTxs.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/nestedTxs.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/nestedTxs.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -35,15 +35,15 @@
#ifndef BOOST_STM_USE_BOOST_MUTEX
-static Mutex L = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L2 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L3 = PTHREAD_MUTEX_INITIALIZER;
-//static Mutex L4 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L2 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L3 = PTHREAD_MUTEX_INITIALIZER;
+//static boost::stm::latm::mutex_type L4 = PTHREAD_MUTEX_INITIALIZER;
#else
-static Mutex L;
-static Mutex L2;
-static Mutex L3;
-//static Mutex L4;
+static boost::stm::latm::mutex_type L;
+static boost::stm::latm::mutex_type L2;
+static boost::stm::latm::mutex_type L3;
+//static boost::stm::latm::mutex_type L4;
#endif
using namespace boost::stm;
Modified: sandbox/stm/branches/vbe/libs/stm/test/stm.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/stm.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/stm.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -53,9 +53,9 @@
eWorkType gWorkLoadType;
#ifndef BOOST_STM_USE_BOOST_MUTEX
-static Mutex finishLock = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type finishLock = PTHREAD_MUTEX_INITIALIZER;
#else
-static Mutex finishLock;
+static boost::stm::latm::mutex_type finishLock;
#endif
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
Modified: sandbox/stm/branches/vbe/libs/stm/test/testHT_latm.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testHT_latm.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testHT_latm.h 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -107,7 +107,7 @@
}
}
- Mutex* get_hash_lock(int val) { return buckets_[val].get_list_lock(); }
+ boost::stm::latm::mutex_type* get_hash_lock(int val) { return buckets_[val].get_list_lock(); }
private:
LATM::LinkedList<T> buckets_[nHashMap::kBuckets];
Modified: sandbox/stm/branches/vbe/libs/stm/test/testHashMapWithLocks.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testHashMapWithLocks.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testHashMapWithLocks.h 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -79,7 +79,7 @@
}
}
- Mutex* get_hash_lock(int val) { return buckets_[val].get_list_lock(); }
+ boost::stm::latm::mutex_type* get_hash_lock(int val) { return buckets_[val].get_list_lock(); }
private:
LATM::LinkedList<T> buckets_[nHashMap::kBuckets2];
Modified: sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.h 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -100,7 +100,7 @@
~LinkedList() { quick_clear(); }
- Mutex* get_list_lock() { return &list_lock_; }
+ boost::stm::latm::mutex_type* get_list_lock() { return &list_lock_; }
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
@@ -533,7 +533,7 @@
public:
list_node<T> head_;
- Mutex list_lock_;
+ boost::stm::latm::mutex_type list_lock_;
};
} // LockAwareTransactions
Modified: sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.h 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -101,7 +101,7 @@
~LinkedList() { quick_clear(); }
- Mutex* get_list_lock() { return &list_lock_; }
+ boost::stm::latm::mutex_type* get_list_lock() { return &list_lock_; }
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
@@ -515,7 +515,7 @@
}
list_node<T> head_;
- Mutex list_lock_;
+ boost::stm::latm::mutex_type list_lock_;
};
} // LockAwareTransactions
Modified: sandbox/stm/branches/vbe/libs/stm/test/txLinearLock.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/txLinearLock.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/txLinearLock.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -19,11 +19,11 @@
static boost::stm::native_trans<int> gInt1;
static boost::stm::native_trans<int> gInt2;
#ifndef BOOST_STM_USE_BOOST_MUTEX
-static Mutex lock1 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex lock2 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type lock1 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type lock2 = PTHREAD_MUTEX_INITIALIZER;
#else
-static Mutex lock1;
-static Mutex lock2;
+static boost::stm::latm::mutex_type lock1;
+static boost::stm::latm::mutex_type lock2;
#endif
////////////////////////////////////////////////////////////////////////////
Modified: sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.cpp 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -21,15 +21,15 @@
static newSyntaxNS::LinkedList< list_node_type > *llist = 0;
#ifndef BOOST_STM_USE_BOOST_MUTEX
-static Mutex L = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L2 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L3 = PTHREAD_MUTEX_INITIALIZER;
-//static Mutex L4 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L2 = PTHREAD_MUTEX_INITIALIZER;
+static boost::stm::latm::mutex_type L3 = PTHREAD_MUTEX_INITIALIZER;
+//static boost::stm::latm::mutex_type L4 = PTHREAD_MUTEX_INITIALIZER;
#else
-static Mutex L;
-static Mutex L2;
-static Mutex L3;
-//static Mutex L4;
+static boost::stm::latm::mutex_type L;
+static boost::stm::latm::mutex_type L2;
+static boost::stm::latm::mutex_type L3;
+//static boost::stm::latm::mutex_type L4;
#endif
using namespace boost::stm;
Modified: sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.h 2009-10-29 11:58:00 EDT (Thu, 29 Oct 2009)
@@ -103,7 +103,7 @@
~LinkedList() { quick_clear(); }
- Mutex* get_list_lock() { return &list_lock_; }
+ boost::stm::latm::mutex_type* get_list_lock() { return &list_lock_; }
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
@@ -515,7 +515,7 @@
}
list_node<T> head_;
- Mutex list_lock_;
+ boost::stm::latm::mutex_type list_lock_;
};
} // LockAwareTransactions
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