Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55963 - in sandbox/stm/branches/vbe/boost/stm: . detail
From: vicente.botet_at_[hidden]
Date: 2009-09-01 16:27:20


Author: viboes
Date: 2009-09-01 16:27:19 EDT (Tue, 01 Sep 2009)
New Revision: 55963
URL: http://svn.boost.org/trac/boost/changeset/55963

Log:
TBoost.Stm vbe rd_ptr do just a read

Text files modified:
   sandbox/stm/branches/vbe/boost/stm/detail/transaction_impl.hpp | 3 +++
   sandbox/stm/branches/vbe/boost/stm/detail/tx_ptr.hpp | 6 ++++--
   sandbox/stm/branches/vbe/boost/stm/transaction.hpp | 2 ++
   3 files changed, 9 insertions(+), 2 deletions(-)

Modified: sandbox/stm/branches/vbe/boost/stm/detail/transaction_impl.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/stm/detail/transaction_impl.hpp (original)
+++ sandbox/stm/branches/vbe/boost/stm/detail/transaction_impl.hpp 2009-09-01 16:27:19 EDT (Tue, 01 Sep 2009)
@@ -558,6 +558,7 @@
 #endif
 
    put_tx_inflight();
+ transactions().push(this);
 }
 
 //--------------------------------------------------------------------------
@@ -760,6 +761,8 @@
    if (!hasLock()) lock_tx();
    abort();
    unlock_tx();
+ transactions().pop();
+
 }
 
 //--------------------------------------------------------------------------

Modified: sandbox/stm/branches/vbe/boost/stm/detail/tx_ptr.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/stm/detail/tx_ptr.hpp (original)
+++ sandbox/stm/branches/vbe/boost/stm/detail/tx_ptr.hpp 2009-09-01 16:27:19 EDT (Tue, 01 Sep 2009)
@@ -175,8 +175,10 @@
 public:
  
     inline rd_ptr(transaction &t, tx_ptr<T> const & tx_obj) :
- tx_obj_p_(t.read_ptr(tx_obj.ptr_))
- {}
+ //tx_obj_p_(t.read_ptr(tx_obj.ptr_))
+ tx_obj_p_(&t.insert_and_return_read_memory(*tx_obj.ptr_))
+
+{}
 
     const T* get() const {
         //if (tx_obj_p_->transaction_->forced_to_abort()) {

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-09-01 16:27:19 EDT (Tue, 01 Sep 2009)
@@ -1201,6 +1201,7 @@
       else return *static_cast<T*>(i->second);
    }
 
+public:
    //-------------------------------------------------------------------
    template <typename T>
    T& insert_and_return_read_memory(T& in)
@@ -1231,6 +1232,7 @@
       return in;
    }
 
+private:
    template <typename T>
    T& deferred_write(T& in)
    {


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