Boost logo

Boost-Commit :

From: hinnant_at_[hidden]
Date: 2007-12-02 17:33:56


Author: hinnant
Date: 2007-12-02 17:33:56 EST (Sun, 02 Dec 2007)
New Revision: 41595
URL: http://svn.boost.org/trac/boost/changeset/41595

Log:
Changed unique_lock::owns() to owns_lock()
Text files modified:
   sandbox/committee/LWG/ref_impl/mutex | 2 +-
   sandbox/committee/LWG/ref_impl/mutex.cpp | 4 ++--
   sandbox/committee/LWG/ref_impl/mutex_base | 6 +++---
   3 files changed, 6 insertions(+), 6 deletions(-)

Modified: sandbox/committee/LWG/ref_impl/mutex
==============================================================================
--- sandbox/committee/LWG/ref_impl/mutex (original)
+++ sandbox/committee/LWG/ref_impl/mutex 2007-12-02 17:33:56 EST (Sun, 02 Dec 2007)
@@ -145,7 +145,7 @@
         bool timed_lock(const system_time& abs_time);
         void unlock();
     
- bool owns() const;
+ bool owns_lock() const;
         operator unspecified-bool-type () const;
         mutex_type* mutex() const;
     

Modified: sandbox/committee/LWG/ref_impl/mutex.cpp
==============================================================================
--- sandbox/committee/LWG/ref_impl/mutex.cpp (original)
+++ sandbox/committee/LWG/ref_impl/mutex.cpp 2007-12-02 17:33:56 EST (Sun, 02 Dec 2007)
@@ -137,7 +137,7 @@
 timed_mutex::try_lock()
 {
     unique_lock<mutex> lk(mut_, try_to_lock);
- if (lk.owns() && !locked_)
+ if (lk.owns_lock() && !locked_)
     {
         locked_ = true;
         return true;
@@ -203,7 +203,7 @@
 {
     pthread_t id = pthread_self();
     unique_lock<mutex> lk(mut_, try_to_lock);
- if (lk.owns() && (state_ == 0 || pthread_equal(id, id_)))
+ if (lk.owns_lock() && (state_ == 0 || pthread_equal(id, id_)))
     {
         if (state_ == numeric_limits<unsigned>::max())
             return false;

Modified: sandbox/committee/LWG/ref_impl/mutex_base
==============================================================================
--- sandbox/committee/LWG/ref_impl/mutex_base (original)
+++ sandbox/committee/LWG/ref_impl/mutex_base 2007-12-02 17:33:56 EST (Sun, 02 Dec 2007)
@@ -172,7 +172,7 @@
     bool timed_lock(const system_time& abs_time);
     void unlock();
 
- bool owns() const {return owns_lock_;}
+ bool owns_lock() const {return owns_lock_;}
     operator int __nat::* () const {return owns_lock_ ? &__nat::_ : 0;}
     mutex_type* mutex() const {return m_;}
 
@@ -257,7 +257,7 @@
 try_lock(L1& l1, L2& l2)
 {
     unique_lock<L1> u(l1, try_to_lock);
- if (u.owns())
+ if (u.owns_lock())
     {
         if (l2.try_lock())
         {
@@ -275,7 +275,7 @@
 {
     unsigned r = 0;
     unique_lock<L1> u(l1, try_to_lock);
- if (u.owns())
+ if (u.owns_lock())
     {
         r = try_lock(l2, l3...);
         if (r == -1)


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