Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77701 - trunk/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock
From: vicente.botet_at_[hidden]
Date: 2012-04-01 16:38:31


Author: viboes
Date: 2012-04-01 16:38:31 EDT (Sun, 01 Apr 2012)
New Revision: 77701
URL: http://svn.boost.org/trac/boost/changeset/77701

Log:
Thread: Fix typos due to copy/paste
Text files modified:
   trunk/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_assign_fail.cpp | 8 ++++----
   trunk/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_ctor_fail.cpp | 10 ++++------
   2 files changed, 8 insertions(+), 10 deletions(-)

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_assign_fail.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_assign_fail.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_assign_fail.cpp 2012-04-01 16:38:31 EDT (Sun, 01 Apr 2012)
@@ -5,9 +5,9 @@
 
 // <boost/thread/locks.hpp>
 
-// template <class Mutex> class unlock_guard;
+// template <class Mutex> class reverse_lock;
 
-// unlock_guard& operator=(unlock_guard const&) = delete;
+// reverse_lock& operator=(reverse_lock const&) = delete;
 
 #include <boost/thread/locks.hpp>
 #include <boost/thread/mutex.hpp>
@@ -21,8 +21,8 @@
   boost::unique_lock<boost::mutex> lk0(m0);
   boost::unique_lock<boost::mutex> lk1(m1);
   {
- boost::unlock_guard<boost::unique_lock<boost::mutex> > lg0(lk0);
- boost::unlock_guard<boost::unique_lock<boost::mutex> > lg1(lk1);
+ boost::reverse_lock<boost::unique_lock<boost::mutex> > lg0(lk0);
+ boost::reverse_lock<boost::unique_lock<boost::mutex> > lg1(lk1);
     lk1 = lk0;
   }
 

Modified: trunk/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_ctor_fail.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_ctor_fail.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_ctor_fail.cpp 2012-04-01 16:38:31 EDT (Sun, 01 Apr 2012)
@@ -5,9 +5,9 @@
 
 // <boost/thread/locks.hpp>
 
-// template <class Mutex> class unlock_guard;
+// template <class Mutex> class reverse_lock;
 
-// unlock_guard(unlock_guard const&) = delete;
+// reverse_lock(reverse_lock const&) = delete;
 
 
 #include <boost/thread/locks.hpp>
@@ -20,12 +20,10 @@
 int main()
 {
   boost::mutex m0;
- boost::mutex m1;
   boost::unique_lock<boost::mutex> lk0(m0);
- boost::unique_lock<boost::mutex> lk1(m1);
   {
- boost::unlock_guard<boost::unique_lock<boost::mutex> > lg0(lk0);
- boost::unlock_guard<boost::unique_lock<boost::mutex> > lg1(lg0);
+ boost::reverse_lock<boost::unique_lock<boost::mutex> > lg0(lk0);
+ boost::reverse_lock<boost::unique_lock<boost::mutex> > lg1(lg0);
   }
 }
 


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