$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r58068 - in sandbox/fiber: boost boost/fiber libs/fiber/doc libs/fiber/test
From: oliver.kowalke_at_[hidden]
Date: 2009-11-30 15:35:42
Author: olli
Date: 2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
New Revision: 58068
URL: http://svn.boost.org/trac/boost/changeset/58068
Log:
- use boost::unique_lock/boost::lock_guard
- documentation adapted
Removed:
   sandbox/fiber/boost/fiber/locks.hpp
   sandbox/fiber/libs/fiber/doc/lockables.qbk
Text files modified: 
   sandbox/fiber/boost/fiber.hpp                      |     1 -                                       
   sandbox/fiber/boost/fiber/bounded_fifo.hpp         |     1 -                                       
   sandbox/fiber/boost/fiber/mutex.hpp                |     3 +--                                     
   sandbox/fiber/boost/fiber/unbounded_fifo.hpp       |     1 -                                       
   sandbox/fiber/libs/fiber/doc/fiber.qbk             |    25 ++++---------------------               
   sandbox/fiber/libs/fiber/doc/todo.qbk              |     2 --                                      
   sandbox/fiber/libs/fiber/test/test_unique_lock.cpp |    26 +++++++++++++-------------              
   7 files changed, 18 insertions(+), 41 deletions(-)
Modified: sandbox/fiber/boost/fiber.hpp
==============================================================================
--- sandbox/fiber/boost/fiber.hpp	(original)
+++ sandbox/fiber/boost/fiber.hpp	2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
@@ -14,7 +14,6 @@
 #include <boost/fiber/exceptions.hpp>
 #include <boost/fiber/fiber.hpp>
 #include <boost/fiber/interruption.hpp>
-#include <boost/fiber/locks.hpp>
 #include <boost/fiber/manual_reset_event.hpp>
 #include <boost/fiber/mutex.hpp>
 #include <boost/fiber/scheduler.hpp>
Modified: sandbox/fiber/boost/fiber/bounded_fifo.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/bounded_fifo.hpp	(original)
+++ sandbox/fiber/boost/fiber/bounded_fifo.hpp	2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
@@ -19,7 +19,6 @@
 #include <boost/fiber/condition.hpp>
 #include <boost/fiber/detail/atomic.hpp>
 #include <boost/fiber/exceptions.hpp>
-#include <boost/fiber/locks.hpp>
 #include <boost/fiber/mutex.hpp>
 
 #include <boost/config/abi_prefix.hpp>
Deleted: sandbox/fiber/boost/fiber/locks.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/locks.hpp	2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
+++ (empty file)
@@ -1,241 +0,0 @@
-
-//          Copyright Oliver Kowalke 2009.
-// Distributed under the Boost Software License, Version 1.0.
-//    (See accompanying file LICENSE_1_0.txt or copy at
-//          http://www.boost.org/LICENSE_1_0.txt)
-//
-//  based on boost::interprocess::sync::scoped_lock
-
-#ifndef BOOST_FIBERS_LOCK_H
-#define BOOST_FIBERS_LOCK_H
-
-#include <algorithm>
-
-#include <boost/config.hpp>
-#include <boost/thread/locks.hpp>
-#include <boost/thread/thread_time.hpp>
-
-#include <boost/fiber/detail/move.hpp>
-
-#include <boost/fiber/exceptions.hpp>
-
-namespace boost {
-namespace fibers {
-
-template< typename Mutex >
-class lock_guard
-{
-private:
-	Mutex	&	mtx_;
-	
-	explicit lock_guard( lock_guard &);
-	lock_guard & operator=( lock_guard &);
-
-public:
-	explicit lock_guard( Mutex & mtx) :
-	    mtx_( mtx)
-	{ mtx_.lock(); }
-	
-	lock_guard( Mutex & mtx, adopt_lock_t) :
-	    mtx_( mtx)
-	{}
-	
-	~lock_guard()
-	{ mtx_.unlock(); }
-};
-
-template< typename Mutex >
-class unique_lock
-{
-private:
-	typedef unique_lock< Mutex >		lock_t;
-	typedef bool unique_lock::*unspecified_bool_type;
-
-	Mutex	*	mtx_; 
-	bool        locked_;
-
-	unique_lock( unique_lock &);
-	unique_lock & operator=( unique_lock &);
-
-public:
-	unique_lock() :
-		mtx_( 0),
-	   	locked_( false)
-	{}
-
-	explicit unique_lock( Mutex & mtx) :
-		mtx_( & mtx),
-		locked_( false)
-	{
-		mtx_->lock();
-		locked_ = true;
-	}
-
-	unique_lock( Mutex & mtx, adopt_lock_t) :
-		mtx_( & mtx),
-		locked_( true)
-	{}
-
-	unique_lock( Mutex & mtx, defer_lock_t) :
-		mtx_( & mtx),
-		locked_( false)
-	{}
-
-	unique_lock( Mutex & mtx, try_to_lock_t) :
-		mtx_( & mtx),
-		locked_( mtx_->try_lock() )
-	{}
-
-	unique_lock( Mutex & mtx, system_time const& abs_time) :
-		mtx_( & mtx),
-		locked_( mtx_->timed_lock( abs_time) )
-	{}
-
-	template< typename TimeDuration >
-	unique_lock( Mutex & mtx, TimeDuration const& rel_time) :
-		mtx_( & mtx),
-		locked_( mtx_->timed_lock( rel_time) )
-	{}
-
-#ifdef BOOST_HAS_RVALUE_REFS
-        unique_lock( unique_lock && other) :
-		mtx_( other.mtx_),
-		locked_( other.locked_)
-        {
-            other.locked_ = false;
-            other.mtx_ = 0;
-        }
-
-        unique_lock< Mutex > && move()
-        { return static_cast< unique_lock< Mutex > && >( * this); }
-
-        unique_lock & operator=( unique_lock< Mutex > && other)
-        {
-            unique_lock tmp( other);
-            swap( tmp);
-            return * this;
-        }
-
-        void swap( unique_lock && other)
-        {
-            std::swap( mtx_, other.mtx_);
-            std::swap( locked_, other.locked_);
-        }
-#else
-        unique_lock( boost::detail::fiber_move_t< unique_lock< Mutex > > other) :
-		mtx_( other->mtx_),
-		locked_( other->locked_)
-        {
-            other->locked_ = false;
-            other->mtx_ = 0;
-        }
-
-        operator boost::detail::fiber_move_t< unique_lock< Mutex > >()
-        { return move(); }
-
-        boost::detail::fiber_move_t< unique_lock< Mutex > > move()
-        { return boost::detail::fiber_move_t< unique_lock< Mutex > >( * this); }
-
-        unique_lock & operator=( boost::detail::fiber_move_t< unique_lock< Mutex > > other)
-        {
-            unique_lock tmp( other);
-            swap( tmp);
-            return * this;
-        }
-
-        void swap( boost::detail::fiber_move_t< unique_lock< Mutex > > other)
-        {
-            std::swap( mtx_, other->mtx_);
-            std::swap( locked_, other->locked_);
-        }
-#endif
-
-	~unique_lock()
-	{
-		try
-		{ if ( locked_ && mtx_) mtx_->unlock(); }
-		catch (...) {}
-	}
-
-	void lock()
-	{
-		if ( ! mtx_ || locked_)
-		   throw lock_error();
-		mtx_->lock();
-		locked_ = true;
-	}
-
-	bool try_lock()
-	{
-		if ( ! mtx_ || locked_)
-		   throw lock_error();
-		locked_ = mtx_->try_lock();
-		return locked_;
-	}
-
-	bool timed_lock( system_time const& abs_time)
-	{
-	   if ( ! mtx_ || locked_)
-	      throw lock_error();
-	   locked_ = mtx_->timed_lock( abs_time);
-	   return locked_;
-	}
-
-	template< typename TimeDuration >
-	bool timed_lock( TimeDuration const& rel_time)
-	{ return timed_lock( get_system_time() + rel_time); }
-
-	void unlock()
-	{
-		if ( ! mtx_ || ! locked_)
-		   throw lock_error();
-		mtx_->unlock();
-		locked_ = false;
-	}
-
-	bool owns_lock() const
-	{ return locked_ && mtx_; }
-
-	operator unspecified_bool_type() const
-	{ return locked_ ? & lock_t::locked_ : 0; }
-
-	bool operator!() const
-	{ return ! locked_; }
-
-	Mutex * mutex() const
-	{ return mtx_; }
-
-	Mutex * release()
-	{
-		Mutex * mtx = mtx_;
-		mtx_ = 0;
-		locked_ = false;
-		return mtx;
-	}
-
-        void swap( unique_lock & other)
-        {
-            std::swap( mtx_, other.mtx_);
-            std::swap( locked_, other.locked_);
-        }
-};
-
-#ifdef BOOST_HAS_RVALUE_REFS
-    template< typename Mutex >
-    void swap( unique_lock< Mutex > && lhs, unique_lock< Mutex > && rhs)
-    { lhs.swap( rhs); }
-#else
-    template< typename Mutex >
-    void swap( unique_lock< Mutex > & lhs, unique_lock< Mutex > & rhs)
-    { lhs.swap(rhs); }
-#endif
-
-#ifdef BOOST_HAS_RVALUE_REFS
-    template< typename Mutex >
-    inline unique_lock< Mutex > && move( unique_lock< Mutex > && ul)
-    { return ul; }
-#endif
-
-}}
-
-#endif // BOOST_FIBERS_LOCK_H
Modified: sandbox/fiber/boost/fiber/mutex.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/mutex.hpp	(original)
+++ sandbox/fiber/boost/fiber/mutex.hpp	2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
@@ -10,11 +10,10 @@
 #define BOOST_FIBERS_MUTEX_H
 
 #include <boost/cstdint.hpp>
+#include <boost/thread/locks.hpp>
 #include <boost/thread/thread_time.hpp>
 #include <boost/utility.hpp>
 
-#include <boost/fiber/locks.hpp>
-
 namespace boost {
 namespace fibers {
 
Modified: sandbox/fiber/boost/fiber/unbounded_fifo.hpp
==============================================================================
--- sandbox/fiber/boost/fiber/unbounded_fifo.hpp	(original)
+++ sandbox/fiber/boost/fiber/unbounded_fifo.hpp	2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
@@ -19,7 +19,6 @@
 #include <boost/fiber/condition.hpp>
 #include <boost/fiber/detail/atomic.hpp>
 #include <boost/fiber/exceptions.hpp>
-#include <boost/fiber/locks.hpp>
 #include <boost/fiber/mutex.hpp>
 
 #include <boost/config/abi_prefix.hpp>
Modified: sandbox/fiber/libs/fiber/doc/fiber.qbk
==============================================================================
--- sandbox/fiber/libs/fiber/doc/fiber.qbk	(original)
+++ sandbox/fiber/libs/fiber/doc/fiber.qbk	2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
@@ -28,16 +28,9 @@
 [def __not_a_fiber__ ['not-a-fiber]]
 [def __scheduler__ ['scheduler]]
 [def __strategy__ ['strategy]]
+[def __lockable_concept__ ['lockable concept]]
 
-[template lockable_concept_link[link_text] [link fiber.synchronization.mutex_concepts.lockable [link_text]]]
-[template lock_ref_link[link_text] [link fiber.synchronization.mutex_concepts.lockable.lock [link_text]]]
-[template lock_multiple_ref_link[link_text] [link fiber.synchronization.lock_functions.lock_multiple [link_text]]]
-[template try_lock_multiple_ref_link[link_text] [link fiber.synchronization.lock_functions.try_lock_multiple [link_text]]]
-[template unlock_ref_link[link_text] [link fiber.synchronization.mutex_concepts.lockable.unlock [link_text]]]
-[template try_lock_ref_link[link_text] [link fiber.synchronization.mutex_concepts.lockable.try_lock [link_text]]]
-[template owns_lock_ref_link[link_text] [link fiber.synchronization.locks.unique_lock.owns_lock [link_text]]]
 [template mutex_func_ref_link[link_text] [link fiber.synchronization.locks.unique_lock.mutex [link_text]]]
-[template unique_lock_link[link_text] [link fiber.synchronization.locks.unique_lock [link_text]]]
 [template join_link[link_text] [link fiber.fiber_management.fiber.join [link_text]]]
 [template cond_wait_link[link_text] [link fiber.synchronization.condvar_ref.condition.wait [link_text]]]
 [template cond_any_wait_link[link_text] [link fiber.synchronization.condvar_ref.condition_variable_any.wait [link_text]]]
@@ -45,20 +38,11 @@
 [template manual_reset_wait_link[link_text] [link fiber.synchronization.eventvar_ref.manual_reset_event.wait [link_text]]]
 [template count_down_wait_link[link_text] [link fiber.synchronization.eventvar_ref.count_down_event.wait [link_text]]]
 
-[def __lockable_concept__ [lockable_concept_link `Lockable` concept]]
-[def __lockable_concept_type__ [lockable_concept_link `Lockable`]]
-[def __lock_multiple_ref__ [lock_multiple_ref_link `lock()`]]
-[def __lock_ref__ [lock_ref_link `lock()`]]
 [def __mutex_func_ref__ [mutex_func_ref_link `mutex()`]]
 [def __mutex__ [link fiber.synchronization.mutex_types.mutex `boost::fibers::mutex`]]
-[def __owns_lock_ref__ [owns_lock_ref_link `owns_lock()`]]
-[def __try_lock_multiple_ref__ [try_lock_multiple_ref_link `try_lock()`]]
-[def __try_lock_ref__ [try_lock_ref_link `try_lock()`]]
-[def __unlock_ref__ [unlock_ref_link `unlock()`]]
-
-
-[def __lock_guard__ [link fiber.synchronization.locks.lock_guard `boost::lock_guard`]]
-[def __unique_lock__ [unique_lock_link `boost::fiber::unique_lock`]]
+[def __lock_ref__  `lock()`]
+[def __try_lock_ref__ `try_lock()`]
+[def __unlock_ref__ `unlock()`]
 
 [def __fiber__ [link fiber.fiber_management.fiber `boost::fiber`]]
 [def __fiber_id__ [link fiber.fiber_management.fiber.id `boost::fiber::id`]]
@@ -84,7 +68,6 @@
 [include overview.qbk]
 [include fiber_ref.qbk]
 [section:synchronization Synchronization]
-[include lockables.qbk]
 [include mutexes.qbk]
 [include condition_variables.qbk]
 [include event_variables.qbk]
Deleted: sandbox/fiber/libs/fiber/doc/lockables.qbk
==============================================================================
--- sandbox/fiber/libs/fiber/doc/lockables.qbk	2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
+++ (empty file)
@@ -1,279 +0,0 @@
-[/
-  (C) Copyright 2007-8 Anthony Williams.
-  Distributed under the Boost Software License, Version 1.0.
-  (See accompanying file LICENSE_1_0.txt or copy at
-  http://www.boost.org/LICENSE_1_0.txt).
-]
-
-[section:mutex_concepts Mutex Concepts]
-
-A mutex object facilitates protection against data races and allows synchronization of data between fibers. A fiber
-obtains ownership of a mutex object by calling one of the lock functions and relinquishes ownership by calling the
-corresponding unlock function.
-
-__boost_fiber__ supports one basic concept for lockable objects: __lockable_concept_type__.
-
-[section:lockable `Lockable` Concept]
-
-The __lockable_concept__ models exclusive ownership. A type that implements the __lockable_concept__ shall provide
-the following member functions:
-
-* [lock_ref_link `void lock();`]
-* [try_lock_ref_link `bool try_lock();`]
-* [unlock_ref_link `void unlock();`]
-
-Lock ownership acquired through a call to __lock_ref__ or __try_lock_ref__ must be released through a call to 
-__unlock_ref__.
-
-[section:lock `void lock()`]
-[variablelist
-[[Effects:] [The current fiber blocks until ownership can be obtained for the current fiber.]]
-[[Postcondition:] [The current fiber owns `*this`.]]
-[[Throws:] [__lock_error__ if an error occurs.]]
-]
-[endsect]
-
-[section:try_lock `bool try_lock()`]
-[variablelist
-[[Effects:] [Attempt to obtain ownership for the current fiber without blocking.]]
-[[Returns:] [`true` if ownership was obtained for the current fiber, `false` otherwise.]]
-[[Postcondition:] [If the call returns `true`, the current fiber owns the `*this`.]]
-[[Throws:] [__lock_error__ if an error occurs.]]
-]
-[endsect]
-
-[section:unlock `void unlock()`]
-[variablelist
-[[Precondition:] [The current fiber owns `*this`.]]
-[[Effects:] [Releases ownership by the current fiber.]]
-[[Postcondition:] [The current fiber no longer owns `*this`.]]
-[[Throws:] [Nothing]]
-]
-[endsect]
-
-[endsect]
-
-[endsect]
-
-[section:locks Lock Types]
-
-[section:lock_guard Class template `lock_guard`]
-
-	    #include <boost/fiber/locks.hpp>
-
-	    template< typename Lockable >
-	    class lock_guard
-	    {
-	    public:
-		explicit lock_guard( Lockable & m_);
-		lock_guard( Lockable & m_, boost::adopt_lock_t);
-
-		~lock_guard();
-	    };
-
-__lock_guard__ is very simple: on construction it
-acquires ownership of the implementation of the __lockable_concept__ supplied as
-the constructor parameter. On destruction, the ownership is released. This
-provides simple RAII-style locking of a __lockable_concept_type__ object, to facilitate exception-safe
-locking and unlocking. In addition, the [link
-fiber.synchronization.locks.lock_guard.constructor_adopt `lock_guard( Lockable &
-m, boost::adopt_lock_t)` constructor] allows the __lock_guard__ object to
-take ownership of a lock already held by the current fiber.
-
-[section:constructor `lock_guard( Lockable & m)`]
-[variablelist
-[[Effects:] [Stores a reference to `m`. Invokes [lock_ref_link `m.lock()`].]]
-[[Throws:] [Any exception thrown by the call to [lock_ref_link `m.lock()`].]]
-]
-[endsect]
-
-[section:constructor_adopt `lock_guard( Lockable & m, boost::adopt_lock_t)`]
-[variablelist
-[[Precondition:] [The current fiber owns a lock on `m` equivalent to one
-obtained by a call to [lock_ref_link `m.lock()`].]]
-[[Effects:] [Stores a reference to `m`. Takes ownership of the lock state of
-`m`.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:destructor `~lock_guard()`]
-[variablelist
-[[Effects:] [Invokes [unlock_ref_link `m.unlock()`] on the __lockable_concept_type__
-object passed to the constructor.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[endsect]
-
-
-[section:unique_lock Class template `unique_lock`]
-
-    #include <boost/fiber/locks.hpp>
-
-    template< typename Lockable >
-    class unique_lock
-    {
-    public:
-	unique_lock();
-	explicit unique_lock( Lockable & m_);
-	unique_lock( Lockable & m_, adopt_lock_t);
-	unique_lock( Lockable & m_, defer_lock_t);
-	unique_lock( Lockable & m_, try_to_lock_t);
-	unique_lock( Lockable & m_, system_time const& target_time);
-
-	~unique_lock();
-
-	unique_lock( detail::fiber_move_t< unique_lock< Lockable > > other);
-	unique_lock( detail::fiber_move_t< upgrade_lock< Lockable > > other);
-
-	operator detail::fiber_move_t< unique_lock< Lockable > >();
-	detail::fiber_move_t< unique_lock< Lockable > > move();
-	unique_lock& operator=( detail::fiber_move_t< unique_lock< Lockable > > other);
-	unique_lock& operator=( detail::fiber_move_t< upgrade_lock< Lockable > > other);
-
-	void swap( unique_lock & other);
-	void swap( detail::fiber_move_t< unique_lock< Lockable > > other);
-
-	void lock();
-	bool try_lock();
-
-	void unlock();
-
-	bool owns_lock() const;
-	operator unspecified-bool-type() const;
-	bool operator!() const;
-
-	Lockable * mutex() const;
-	Lockable * release();
-    };
-
-__unique_lock__ is more complex than __lock_guard__: not only does it provide for RAII-style locking, it also allows
-for deferring acquiring the lock until the __lock_ref__ member function is called explicitly, or trying to acquire
-the lock in a non-blocking fashion, or with a timeout. Consequently, __unlock_ref__ is only called in the destructor
-if the lock object has locked the __lockable_concept_type__ object, or otherwise adopted a lock on the
-__lockable_concept_type__ object.
-
-An instance of __unique_lock__ is said to ['own] the lock state of a __lockable_concept_type__ `m` if
-__mutex_func_ref__ returns a pointer to `m` and __owns_lock_ref__ returns `true`. If an object that ['owns] the lock
-state of a __lockable_concept_type__ object is destroyed, then the destructor will invoke [unlock_ref_link
-`mutex()->unlock()`].
-
-The member functions of __unique_lock__ are not fiber-safe. In particular, __unique_lock__ is intended to model the
-ownership of a __lockable_concept_type__ object by a particular fiber, and the member functions that release
-ownership of the lock state (including the destructor) must be called by the same fiber that acquired ownership of
-the lock state.
-
-[section:defaultconstructor `unique_lock()`]
-
-[variablelist
-[[Effects:] [Creates a lock object with no associated mutex.]]
-[[Postcondition:] [__owns_lock_ref__ returns `false`. __mutex_func_ref__ returns `NULL`.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:constructor `unique_lock(Lockable & m)`]
-
-[variablelist
-[[Effects:] [Stores a reference to `m`. Invokes [lock_ref_link `m.lock()`].]]
-[[Postcondition:] [__owns_lock_ref__ returns `true`. __mutex_func_ref__ returns `&m`.]]
-[[Throws:] [Any exception thrown by the call to [lock_ref_link `m.lock()`].]]
-]
-[endsect]
-
-[section:constructor_adopt `unique_lock(Lockable & m,boost::adopt_lock_t)`]
-
-[variablelist
-[[Precondition:] [The current fiber owns an exclusive lock on `m`.]]
-[[Effects:] [Stores a reference to `m`. Takes ownership of the lock state of `m`.]]
-[[Postcondition:] [__owns_lock_ref__ returns `true`. __mutex_func_ref__ returns `&m`.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:constructor_defer `unique_lock(Lockable & m,boost::defer_lock_t)`]
-
-[variablelist
-[[Effects:] [Stores a reference to `m`.]]
-[[Postcondition:] [__owns_lock_ref__ returns `false`. __mutex_func_ref__ returns `&m`.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:constructor_try `unique_lock(Lockable & m,boost::try_to_lock_t)`]
-
-[variablelist
-[[Effects:] [Stores a reference to `m`. Invokes [try_lock_ref_link
-`m.try_lock()`], and takes ownership of the lock state if the call returns
-`true`.]]
-[[Postcondition:] [__mutex_func_ref__ returns `&m`. If the call to __try_lock_ref__
-returned `true`, then __owns_lock_ref__ returns `true`, otherwise __owns_lock_ref__
-returns `false`.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:destructor `~unique_lock()`]
-
-[variablelist
-[[Effects:] [Invokes __mutex_func_ref__`->`[unlock_ref_link `unlock()`] if
-__owns_lock_ref__ returns `true`.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:owns_lock `bool owns_lock() const`]
-
-[variablelist
-[[Returns:] [`true` if the `*this` owns the lock on the __lockable_concept_type__
-object associated with `*this`.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:mutex `Lockable* mutex() const`]
-
-[variablelist
-[[Returns:] [A pointer to the __lockable_concept_type__ object associated with
-`*this`, or `NULL` if there is no such object.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:bool_conversion `operator unspecified-bool-type() const`]
-
-[variablelist
-[[Returns:] [If __owns_lock_ref__ would return `true`, a value that evaluates to
-`true` in boolean contexts, otherwise a value that evaluates to `false` in
-boolean contexts.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:operator_not `bool operator!() const`]
-
-[variablelist
-[[Returns:] [`!` __owns_lock_ref__.]]
-[[Throws:] [Nothing.]]
-]
-[endsect]
-
-[section:release `Lockable* release()`]
-
-[variablelist
-[[Effects:] [The association between `*this` and the __lockable_concept_type__ object is removed, without affecting
-the lock state of the __lockable_concept_type__ object. If __owns_lock_ref__ would have returned `true`, it is the
-responsibility of the calling code to ensure that the __lockable_concept_type__ is correctly unlocked.]]
-[[Returns:] [A pointer to the __lockable_concept_type__ object associated with `*this` at the point of the call, or
-`NULL` if there is no such object.]]
-[[Throws:] [Nothing.]]
-[[Postcondition:] [`*this` is no longer associated with any __lockable_concept_type__ object. __mutex_func_ref__
-returns `NULL` and __owns_lock_ref__ returns `false`.]]
-]
-[endsect]
-
-[endsect]
-
-[endsect]
Modified: sandbox/fiber/libs/fiber/doc/todo.qbk
==============================================================================
--- sandbox/fiber/libs/fiber/doc/todo.qbk	(original)
+++ sandbox/fiber/libs/fiber/doc/todo.qbk	2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
@@ -23,6 +23,4 @@
 
 * provide a barrier class
 
-* provide a spin-wait class
-
 [endsect]
Modified: sandbox/fiber/libs/fiber/test/test_unique_lock.cpp
==============================================================================
--- sandbox/fiber/libs/fiber/test/test_unique_lock.cpp	(original)
+++ sandbox/fiber/libs/fiber/test/test_unique_lock.cpp	2009-11-30 15:35:39 EST (Mon, 30 Nov 2009)
@@ -46,7 +46,7 @@
 void test_lock()
 {
         boost::fibers::mutex mtx;
-	boost::fibers::unique_lock< boost::fibers::mutex > lk( mtx);
+	boost::unique_lock< boost::fibers::mutex > lk( mtx);
 
         BOOST_CHECK( lk);
         BOOST_CHECK( lk.owns_lock() );
@@ -60,7 +60,7 @@
 void test_defer_lock()
 {
         boost::fibers::mutex mtx;
-	boost::fibers::unique_lock< boost::fibers::mutex > lk( mtx, boost::defer_lock);
+	boost::unique_lock< boost::fibers::mutex > lk( mtx, boost::defer_lock);
 
         BOOST_CHECK( ! lk);
         BOOST_CHECK( ! lk.owns_lock() );
@@ -75,7 +75,7 @@
 {
         boost::fibers::mutex mtx;
         mtx.lock();
-	boost::fibers::unique_lock< boost::fibers::mutex > lk( mtx, boost::adopt_lock);
+	boost::unique_lock< boost::fibers::mutex > lk( mtx, boost::adopt_lock);
 
         BOOST_CHECK( lk);
         BOOST_CHECK( lk.owns_lock() );
@@ -84,7 +84,7 @@
 void test_try_lock()
 {
         boost::fibers::mutex mtx;
-	boost::fibers::unique_lock< boost::fibers::mutex > lk( mtx, boost::defer_lock);
+	boost::unique_lock< boost::fibers::mutex > lk( mtx, boost::defer_lock);
 
         BOOST_CHECK( ! lk);
         BOOST_CHECK( ! lk.owns_lock() );
@@ -98,31 +98,31 @@
 void test_lock_twice()
 {
         boost::fibers::mutex mtx;
-	boost::fibers::unique_lock< boost::fibers::mutex > lk( mtx);
+	boost::unique_lock< boost::fibers::mutex > lk( mtx);
 
-	BOOST_CHECK_THROW( lk.lock(), boost::fibers::lock_error);
+	BOOST_CHECK_THROW( lk.lock(), boost::lock_error);
 }
 
 void test_try_lock_twice()
 {
         boost::fibers::mutex mtx;
-	boost::fibers::unique_lock< boost::fibers::mutex > lk( mtx);
+	boost::unique_lock< boost::fibers::mutex > lk( mtx);
 
-	BOOST_CHECK_THROW( lk.try_lock(), boost::fibers::lock_error);
+	BOOST_CHECK_THROW( lk.try_lock(), boost::lock_error);
 }
 
 void test_unlock_twice()
 {
         boost::fibers::mutex mtx;
-	boost::fibers::unique_lock< boost::fibers::mutex > lk( mtx);
+	boost::unique_lock< boost::fibers::mutex > lk( mtx);
         lk.unlock();
 
-	BOOST_CHECK_THROW( lk.unlock(), boost::fibers::lock_error);
+	BOOST_CHECK_THROW( lk.unlock(), boost::lock_error);
 }
 
 void test_default_ctor()
 {
-	boost::fibers::unique_lock< boost::fibers::mutex > lk;
+	boost::unique_lock< boost::fibers::mutex > lk;
 
         BOOST_CHECK( ! lk);
         BOOST_CHECK( ! lk.owns_lock() );
@@ -152,7 +152,7 @@
     dummy_mutex mtx1, mtx2;
     mtx2.lock();
 
-    boost::fibers::unique_lock< dummy_mutex > lk1( mtx1, boost::defer_lock),
+    boost::unique_lock< dummy_mutex > lk1( mtx1, boost::defer_lock),
         lk2( mtx2, boost::defer_lock);
 
     int res = boost::try_lock( lk1, lk2);
@@ -168,7 +168,7 @@
 {
         boost::fibers::mutex mtx1, mtx2;
         
-	boost::fibers::unique_lock< boost::fibers::mutex > lk1( mtx1), lk2( mtx2);
+	boost::unique_lock< boost::fibers::mutex > lk1( mtx1), lk2( mtx2);
         
         BOOST_CHECK_EQUAL( lk1.mutex(), & mtx1);
         BOOST_CHECK_EQUAL( lk2.mutex(), & mtx2);