Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60562 - in sandbox/stm/branches/vbe/boost/synchro: . lockers
From: vicente.botet_at_[hidden]
Date: 2010-03-13 19:05:55


Author: viboes
Date: 2010-03-13 19:05:55 EST (Sat, 13 Mar 2010)
New Revision: 60562
URL: http://svn.boost.org/trac/boost/changeset/60562

Log:
Boost.STM/vbe:
* Add force tag and unique_lock construction

Text files modified:
   sandbox/stm/branches/vbe/boost/synchro/lockers/unique_lock.hpp | 10 ++++++++++
   sandbox/stm/branches/vbe/boost/synchro/tags.hpp | 3 +++
   2 files changed, 13 insertions(+), 0 deletions(-)

Modified: sandbox/stm/branches/vbe/boost/synchro/lockers/unique_lock.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/synchro/lockers/unique_lock.hpp (original)
+++ sandbox/stm/branches/vbe/boost/synchro/lockers/unique_lock.hpp 2010-03-13 19:05:55 EST (Sat, 13 Mar 2010)
@@ -44,6 +44,16 @@
             lock();
         }
 
+ unique_lock(Mutex& m_,bool b):
+ m(&m_),is_locked(false)
+ {
+ if (b) lock();
+ }
+ unique_lock(Mutex& m_,force_lock_t):
+ m(&m_),is_locked(false)
+ {
+ lock();
+ }
         unique_lock(Mutex& m_,adopt_lock_t):
             m(&m_),is_locked(true)
         {}

Modified: sandbox/stm/branches/vbe/boost/synchro/tags.hpp
==============================================================================
--- sandbox/stm/branches/vbe/boost/synchro/tags.hpp (original)
+++ sandbox/stm/branches/vbe/boost/synchro/tags.hpp 2010-03-13 19:05:55 EST (Sat, 13 Mar 2010)
@@ -19,6 +19,8 @@
 
 namespace boost { namespace synchro {
 
+ struct force_lock_t
+ {};
     struct defer_lock_t
     {};
     struct try_to_lock_t
@@ -26,6 +28,7 @@
     struct adopt_lock_t
     {};
 
+ const force_lock_t force_lock={};
     const defer_lock_t defer_lock={};
     const try_to_lock_t try_to_lock={};
     const adopt_lock_t adopt_lock={};


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