Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51848 - in sandbox/synchro/libs/synchro/doc: . reference reference/lockable reference/lockables tutorial
From: vicente.botet_at_[hidden]
Date: 2009-03-18 19:16:00


Author: viboes
Date: 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
New Revision: 51848
URL: http://svn.boost.org/trac/boost/changeset/51848

Log:
0.3.0 : Adding lock_until/for try_lock_until/for free functions + usage of Boost/Chrono

Added:
   sandbox/synchro/libs/synchro/doc/reference/array_locker.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/
   sandbox/synchro/libs/synchro/doc/reference/lockable/lock.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/lock_for.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/lock_shared.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/lock_shared_for.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/lock_shared_until.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/lock_until.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/lock_upgrade.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/lock_upgrade_for.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/lock_upgrade_until.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_for.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_shared.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_shared_for.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_until.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_upgrade.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_upgrade_until.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_shared_and_lock.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_shared_and_lock_upgrade.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_upgrade_and_lock_for.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_upgrade_and_lock_until.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_and_lock_shared.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_and_lock_upgrade.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_shared.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_shared_and_lock.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock_for.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock_shared.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock_until.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockables/
Text files modified:
   sandbox/synchro/libs/synchro/doc/appendices.qbk | 6 -
   sandbox/synchro/libs/synchro/doc/changes.qbk | 43 -----------------
   sandbox/synchro/libs/synchro/doc/introduction.qbk | 96 ++++++++++++++++++++-------------------
   sandbox/synchro/libs/synchro/doc/overview.qbk | 12 ++--
   sandbox/synchro/libs/synchro/doc/reference.qbk | 55 ++++++++++++++++++++++
   sandbox/synchro/libs/synchro/doc/reference/lockable_concept.qbk | 54 +++++++++++-----------
   sandbox/synchro/libs/synchro/doc/references.qbk | 5 ++
   sandbox/synchro/libs/synchro/doc/synchro.qbk | 37 +++++++++++++++
   sandbox/synchro/libs/synchro/doc/tutorial.qbk | 2
   sandbox/synchro/libs/synchro/doc/tutorial/external_locking.qbk | 4
   sandbox/synchro/libs/synchro/doc/tutorial/internal_locking.qbk | 2
   sandbox/synchro/libs/synchro/doc/tutorial/lockable.qbk | 2
   sandbox/synchro/libs/synchro/doc/tutorial/rendezvous.qbk | 2
   sandbox/synchro/libs/synchro/doc/tutorial/volatile_locking_ptr.qbk | 4 -
   14 files changed, 189 insertions(+), 135 deletions(-)

Modified: sandbox/synchro/libs/synchro/doc/appendices.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/appendices.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/appendices.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -4,7 +4,7 @@
   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 Appendices]
@@ -29,9 +29,7 @@
 
 [heading Tasks to do before review]
 
-* `array_locker` and `tuple_locker` locker containers.
-* A complement to the already present in Boost.Thread `lock`, `try_lock` free functions:
- * `lock_until`, `lock_for`, `try_lock_until`, `try_lock_for`, `unlock`
+* `tuple_locker` locker containers.
 
 [heading For later releases]
 

Modified: sandbox/synchro/libs/synchro/doc/changes.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/changes.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/changes.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -1,43 +0,0 @@
-[/
- (C) Copyright 2008 Vicente J Botet Escriba.
- 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:changes Appendix A: History]
-
-[heading [*Version 0.2, December 07, 2008] ['Movable thread tuples, Threader and test on more toolsets]]
-
-[*Features:]
-
-* Make movable thread_tuple_once and thread_group_once
-* Threader/joiner classes
-
-[*Toolsets:]
-
-* Tested with static and shared lib.
-* Tested on Linux gcc 3.4.6.
-* Tested on Linux gcc 4.1.2.
-* Modification helping Windows.
-
-[*Bugs:]
-
-* basic_keep_alive example do not link.
-
-[heading [*Version 0.1, November 30, 2008] ['Announcement of Interthreads]]
-
-[*Features:]
-
-* thread setup/cleanup decorator,
-* thread specific shared pointer,
-* thread keep alive mechanism,
-* thread tuples, set_once synchrohonizer, thread_tuple_once and thread_group_once.
-
-[heading [*Bugs:]]
-
-[*v0.1#1: basic_keep_alive example do not link.]
-
-
-
-[endsect]

Modified: sandbox/synchro/libs/synchro/doc/introduction.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/introduction.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/introduction.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -12,45 +12,43 @@
 
 [section Mapping the current mutexes (Boost.Thread and Boost/Interprocess) to the common concepts]
 
-The mapping from the current mutexes and scoped guards (Boost.Thread and Boost/Interprocess) to common concepts has been done by adapting the required signatures to the underlying models. For example thread_timed_mutex is defied as:
+The mapping from the current mutexes and scoped guards (Boost.Thread and Boost/Interprocess) to the common concepts has been done adding a indirection level. Instead of requiring a given member function, the lockable concepts reside in fre functions. Neither the Boost.Thread nor Boost/Interprocess mutexes and locks are based on functions, but can see them as models of the common lockable and loker concepts by specializing these generic free functions. In order to make easier the mapping these functions call by default to a member function with the equivalent signature.
 
- class thread_timed_mutex
- : public lock_traits_base<
- multi_threaded_tag,
- exclusive_lock_tag,
- non_recursive_tag,
- has_timed_interface_tag,
- process_lifetime_tag,
- anonymous_tag,
- timed_mutex
- > {
- public:
- typedef boost::condition_variable_any best_condition_type;
- typedef boost::condition_variable_any best_condition_any_type;
 
- //Non-copyable
- BOOST_COPY_CONSTRUCTOR_DELETE(thread_mutex) /*< disable copy construction >*/
- BOOST_COPY_ASSIGNEMENT_DELETE(thread_mutex) /*< disable copy asignement >*/
- thread_timed_mutex () {}
-
- bool try_lock_until(system_time const & abs_time) {
- return timed_lock(abs_time);
- }
- template<typename TimeDuration>
- bool try_lock_for(TimeDuration const & relative_time) {
- return timed_lock(relative_time);
- }
+For example thread_timed_mutex is viwed as a lockable by specializing the folloxing functions:
 
- void lock_until(system_time const & abs_time) {
- if(!timed_lock(abs_time)) throw timeout_exception();
- }
- template<typename TimeDuration>
- void lock_for(TimeDuration const & relative_time) {
- if(!timed_lock(relative_time)) throw timeout_exception();
- }
- };
+ namespace partial_specialization_workaround {
+ template <class Clock, class Duration >
+ struct lock_until<boost::timed_mutex,Clock, Duration> {
+ static void
+ apply( boost::timed_mutex& lockable, const chrono::time_point<Clock, Duration>& abs_time ) {
+ if(!lockable.timed_lock(boost::convert_to<posix_time::ptime>(abs_time))) throw timeout_exception();
+ }
+ };
+ template <class Rep, class Period >
+ struct lock_for<boost::timed_mutex,Rep, Period> {
+ static void
+ apply( boost::timed_mutex& lockable, const chrono::duration<Rep, Period>& rel_time ) {
+ if(!lockable.timed_lock(boost::convert_to<posix_time::time_duration>(rel_time))) throw timeout_exception();
+ }
+ };
+ template <class Clock, class Duration >
+ struct try_lock_until<boost::timed_mutex,Clock, Duration> {
+ static typename result_of::template try_lock_until<boost::timed_mutex,Clock, Duration>::type
+ apply( boost::timed_mutex& lockable, const chrono::time_point<Clock, Duration>& abs_time ) {
+ return lockable.timed_lock(boost::convert_to<posix_time::ptime>(abs_time));
+ }
+ };
+ template <class Rep, class Period >
+ struct try_lock_for<boost::timed_mutex,Rep, Period> {
+ static typename result_of::template try_lock_for<boost::timed_mutex,Rep, Period>::type
+ apply( boost::timed_mutex& lockable, const chrono::duration<Rep, Period>& rel_time ) {
+ return lockable.timed_lock(boost::convert_to<posix_time::time_duration>(rel_time));
+ }
+ };
+ }
 
-Note that only the functions for which the interface change are defined. The others are inherited.
+Note that only the functions for which the equivalent signature differ are defined. For the others the default works as expected.
 
 [endsect]
 
@@ -96,7 +94,7 @@
 
 Based on the idead of Kevlin Henney, the library supports timeout exception for all the locking functions having a time or duration parameter.
 
-* A lock with a timeout i.e. a time or a duration, parameter throws a `timeout_exception` on expiry
+* A lock with a timeout parameter, i.e. a time or a duration, throws a `timeout_exception` on expiry
 * A `try_lock` with a timeout simply returns false on expiry
 * Any of the conditional locks throw a `timeout_exception` on expiry
 * all the locker constructors with the first parameter a timeout.
@@ -133,7 +131,11 @@
 
 The library defines some locker adapters which take care of naming differences and that can be used like
 
- boost::synchro::unique_locker<Lockable> scoped(guard);
+ boost::synchro::unique_locker<boost::mutex> scoped(guard);
+
+or
+
+ boost::synchro::unique_locker<boost::interprocess::interprocess_mutex> scoped(guard);
 
 [*Strict lockers]
 
@@ -168,7 +170,7 @@
         ...
     };
 
-and a meta function `is_strict_locker` which states if a locker is a strict locker
+and a meta function `is_strict_locker` which states if a locker is a strict locker.
 
 So as strict lockers do not provide lock/unlock functions they are not models of Lockable.
 
@@ -188,7 +190,7 @@
         return pulled;
     }
 
-All of them use a safe strategy for a Boolean conversion which use a member pointer rather than a `bool`, which is typically too permissive:
+All of them use a safe strategy for a boolean conversion which use a member pointer rather than a `bool`, which is typically too permissive:
 
     typedef bool try_locker::*is_locked;
     operator is_locked() const {
@@ -217,7 +219,7 @@
 
 In addition to supporting timeout exception for Lock, the library supports them also for ExceptionBaseTimedLockers. The semantics of each constructor and member function are identical to those of boost::unique_locker<Lockable> for the same Lockable, except that the constructor that takes a time or a duration as first parameter in a addition to the reference to a mutex will call `m.lock_until(t)` or `m.lock_for(d)` rather than `m.try_lock_until(t)` or `m.try_lock_for(d)` and so a `timeout_exception` is possible on the constructor.
 
-Let me satrt with an example of an application needing to lock several locks at the same time. Once all the locks are locked something must be done. Other wise the application do womething else and reiterate the lock requests. The natural and exception safe way to do that is
+Let me start with an example of an application needing to lock several locks at the same time. Once all the locks are locked something must be done. Otherwise the application do something else and reiterate the lock requests. The natural and exception safe way to do that is
 
     while (polling) {
         t=now()+100;
@@ -230,7 +232,7 @@
         } else execute_on_failed();
     }
 
-The problem with this code is that it locks `m2` even if `l1` do not owns the lock `m1`. The advertised reader could argument that if the lock m1 has not been locked by a timeout the as all share the same time constraint the failing lock of m2 will not be expensive. Well the problem is that the locking of m1 can fail because m1 is already locked. When we try to optimize this
+The problem with this code is that it locks `m2` even if `l1` do not owns the lock `m1`. The advertised reader could argument that if the lock m1 has not been locked by a timeout, as all share the same time constraint the failing lock of m2 will not be expensive. Well the problem is that the locking of m1 can fail because m1 is already locked. When we try to optimize this
 
     while (polling) {
         t=now()+100;
@@ -251,7 +253,7 @@
 
 [*try_lock_until and try_lock_for free functions]
 
-To avoid this we can request the acquisition of all the locks toghether (letting the function to try any order), as it does the function try_lock of Boost.Threads, but adding this time a expiration period parameter
+To avoid this we can request the acquisition of all the locks toghether (letting the function to try several orders), as it does the function try_lock of Boost.Threads, but adding this time a expiration period parameter
 
     while (polling) {
         if (boost::try_lock_for(100, m1, m2, m3)) {
@@ -280,14 +282,14 @@
 So the preceding code becomes without timeout exceptions
 
     while (polling) {
- boost::synchro::array_locker<boost::mutex, 3> lk(m1, m2, m3, 100);
+ boost::synchro::array_unique_locker<boost::mutex, 3> lk(m1, m2, m3, 100);
         if (lk.owns_lock()) {
             foo();
             polling = false;
         } else execute_on_failed();
     }
 
-which is not exception safe or with exception based timed locks (Note that the time is given before the locks)
+which is exception safe or with exception based timed locks (Note that the time is given before the locks)
 
     while (polling)
     try { boost::synchro::array_locker<boost::mutex, 3> lk(100, m1, m2, m3);
@@ -295,10 +297,10 @@
         polling = false;
     } catch (boost::synchro::timed_exception& ex) { execute_on_failed(); }
 
-When the Locks locked by an `array_locker` are not homogeneus we need some kind of tuple.
+When the Locks locked by an `array_unique_locker` are not homogeneus we need some kind of tuple.
 
     while (polling)
- try { boost::synchro::tuple_locker<T1, T2, T1> lk(100, m1, m2, m3);
+ try { boost::synchro::tuple_unique_locker<T1, T2, T1> lk(100, m1, m2, m3);
         foo();
         polling = false;
     } catch (boost::synchro::timed_exception& ex) { execute_on_failed(); }
@@ -306,7 +308,7 @@
 
 [*`lock_until` and `lock_for` free functions]
 
-For completude the exception based timed multi lock functions `lock_until` and `lock_for` are also provided.
+For completion the exception based timed multi lock functions `unlock`, `lock_until` and `lock_for` are also provided.
 
     while (polling)
         try {

Modified: sandbox/synchro/libs/synchro/doc/overview.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/overview.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/overview.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -30,11 +30,11 @@
 * A uniform usage of Boost.Thread and Boost.Interprocess synchronization mechanisms based on lockables(mutexes) concepts and locker(guards) concepts.
 
     * lockables traits and lock generators,
- * lock adapters of the Boost.Thread and Boost.Interprocess lockable models,
+ * generic free functions on lockables as: `lock`, `try_lock`
     * locker adapters of the Boost.Thread and Boost.Interprocess lockers models,
     * complete them with the corresponding models for single-threaded programms: `null_mutex` and `null_condition` classes,
     * locking families,
- * `semaphore`,
+ * `semaphore` and `binary_semaphore`,
     * `condition_lockable` lock which put toghether a lock and its associated conditions.
 
 * A coherent way exception based timed lock approach for functions and constructors,
@@ -47,17 +47,17 @@
     * `locking_ptr`, `on_derreference_locking_ptr`,
     * `externally_locked`,
     
-* `array_locker` and `tuple_locker` locker ocntainers.
-
-* A complement to the already present in Boost.Thread `lock`, `try_lock` free functions:
+* `array_locker` on multiple lockables.
 
+* Generic free functions on multiple lockables `lock`, `try_lock`, `lock_until`, `lock_for`, `try_lock_until`, `try_lock_for`, `unlock` * lock adapters of the Boost.Thread and Boost.Interprocess lockable models,
     * `lock_until`, `lock_for`, `try_lock_until`, `try_lock_for`
 
 * A polymorphic lockable hierarchy.
 
 * High-level abstractions for handling more complicated synchronization problems, including
     * `monitor` for guaranteeing exclusive access to an object, and
- * a so-called rendezvous mechanism for handling direct communication between objects `concurrent_components` via `ports` using an accept-synchronize protocol based on the design of the concurrency library in the Beta language.
+
+* A rendezvous mechanism for handling direct communication between objects `concurrent_components` via `ports` using an accept-synchronize protocol based on the design of the concurrency library in the Beta language.
 
 
 [/====================================]

Modified: sandbox/synchro/libs/synchro/doc/reference.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/reference.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/reference.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -15,6 +15,60 @@
 [include reference/lockable_adapter.qbk]
 [endsect]
 
+[section Generic Free Functions on Lockable]
+[/include reference/lockable/functions.qbk]
+[include reference/lockable/lock.qbk]
+[include reference/lockable/unlock.qbk]
+[include reference/lockable/try_lock.qbk]
+[include reference/lockable/try_lock_until.qbk]
+[include reference/lockable/try_lock_for.qbk]
+[include reference/lockable/lock_until.qbk]
+[include reference/lockable/lock_for.qbk]
+[include reference/lockable/lock_shared.qbk]
+[include reference/lockable/unlock_shared.qbk]
+[include reference/lockable/try_lock_shared.qbk]
+[/include reference/lockable/try_lock_shared_until.qbk]
+[include reference/lockable/try_lock_shared_for.qbk]
+[include reference/lockable/lock_shared_until.qbk]
+[include reference/lockable/lock_shared_for.qbk]
+[include reference/lockable/lock_upgrade.qbk]
+[include reference/lockable/unlock_upgrade.qbk]
+[include reference/lockable/try_lock_upgrade.qbk]
+[include reference/lockable/try_lock_upgrade_until.qbk]
+[/include reference/lockable/try_lock_upgrade_for.qbk]
+[include reference/lockable/lock_upgrade_until.qbk]
+[include reference/lockable/lock_upgrade_for.qbk]
+[include reference/lockable/unlock_and_lock_upgrade.qbk]
+[include reference/lockable/unlock_and_lock_shared.qbk]
+[include reference/lockable/unlock_upgrade_and_lock_shared.qbk]
+[include reference/lockable/unlock_upgrade_and_lock.qbk]
+[include reference/lockable/unlock_upgrade_and_lock_until.qbk]
+[include reference/lockable/unlock_upgrade_and_lock_for.qbk]
+[/include reference/lockable/try_unlock_upgrade_and_lock.qbk]
+[include reference/lockable/try_unlock_upgrade_and_lock_until.qbk]
+[include reference/lockable/try_unlock_upgrade_and_lock_for.qbk]
+[include reference/lockable/unlock_shared_and_lock.qbk]
+[/include reference/lockable/unlock_shared_and_lock_until.qbk]
+[/include reference/lockable/unlock_shared_and_lock_for.qbk]
+[include reference/lockable/try_unlock_shared_and_lock.qbk]
+[/include reference/lockable/try_unlock_shared_and_lock_until.qbk]
+[/include reference/lockable/try_unlock_shared_and_lock_for.qbk]
+[include reference/lockable/try_unlock_shared_and_lock_upgrade.qbk]
+[/include reference/lockable/try_unlock_shared_and_lock_upgrade_until.qbk]
+[/include reference/lockable/try_unlock_shared_and_lock_upgrade_for.qbk]
+[endsect]
+
+[section Generic Free Functions on Multiple Lockables]
+[/include reference/lockables/functions.qbk]
+[/include reference/lockables/lock.qbk]
+[/include reference/lockables/unlock.qbk]
+[/include reference/lockables/try_lock.qbk]
+[/include reference/lockables/try_lock_until.qbk]
+[/include reference/lockables/try_lock_for.qbk]
+[/include reference/lockables/lock_until.qbk]
+[/include reference/lockables/lock_for.qbk]
+[endsect]
+
 [section Condition Lockables]
 [/include concepts/ConditionLockables.qbk]
 [include reference/condition_safe.qbk]
@@ -34,6 +88,7 @@
 [include reference/externally_locked.qbk]
 [include reference/locking_ptr.qbk]
 [include reference/on_derreference_locking_ptr.qbk]
+[include reference/array_locker.qbk]
 [endsect]
 
 [section Single-threaded]

Added: sandbox/synchro/libs/synchro/doc/reference/array_locker.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/array_locker.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,111 @@
+[/
+ / Copyright (c) 2008-2009 Vicente J. Botet Escriba
+ /
+ / 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:array_unique_locker_hpp Header `<boost/synchro/locker/array_unique_locker.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+
+ template <typename Lockable, unsigned N>
+ class unique_array_locker;
+ template <typename Lockable, unsigned N>
+ class try_unique_array_locker;
+
+ }}
+
+[section Template Class `unique_array_locker<>`]
+[*Synopsis]
+
+
+ template <typename Lockable, unsigned N>
+ class unique_array_locker {
+ public:
+ typedef Lockable lockable_type;
+ BOOST_NON_CONST_COPY_CONSTRUCTOR_DELETE(unique_array_locker) /*< disable copy construction >*/
+ BOOST_NON_CONST_COPY_ASSIGNEMENT_DELETE(unique_array_locker) /*< disable copy asignement >*/
+
+ unique_array_locker(Lockable& m0, ..., Lockable& m_n);
+ unique_array_locker(Lockable& m0, ..., Lockable& m_n, adopt_lock_t);
+ unique_array_locker(Lockable& m0, ..., Lockable& m_n, defer_lock);
+ unique_array_locker(Lockable& m0, ..., Lockable& m_n, try_to_lock_t);
+
+ // try_lock_until constructor
+ template<class Clock, class Duration >
+ unique_array_locker(Lockable& m0, ..., Lockable& m_n, chrono::time_point<Clock, Duration> const& target_time);
+ template<class Rep, class Period >
+ unique_array_locker(Lockable& m0, ..., Lockable& m_n, chrono::duration<Rep, Period> const& target_time)
+
+ template<class Clock, class Duration >
+ unique_array_locker(Lockable& m0, ..., Lockable& m_n, chrono::time_point<Clock, Duration> const& target_time, throw_timeout_t);
+ template<class Rep, class Period >
+ unique_array_locker(Lockable& m0, ..., Lockable& m_n, chrono::duration<Rep, Period> const& target_time, throw_timeout_t)
+
+ template<class Clock, class Duration >
+ unique_array_locker(chrono::time_point<Clock, Duration> const& target_time, Lockable& m0, ..., Lockable& m_n);
+ template<class Rep, class Period >
+ unique_array_locker(chrono::duration<Rep, Period> const& target_time, Lockable& m0, ..., Lockable& m_n, )
+
+ template<class Clock, class Duration >
+ unique_array_locker(nothrow_timeout_t, chrono::time_point<Clock, Duration> const& target_time, Lockable& m0, ..., Lockable& m_n);
+ template<class Rep, class Period >
+ unique_array_locker(nothrow_timeout_t, chrono::duration<Rep, Period> const& target_time, Lockable& m0, ..., Lockable& m2)
+
+ ~unique_array_locker();
+
+ bool is_locking(lockable_type* l) const;
+ bool owns_lock() const;
+ typedef unspecified-type bool_type)() const; /*< safe bool idiom >*/
+ operator bool_type() const;
+ bool operator!() const;
+
+ void lock();
+ template<class Clock, class Duration >
+ void lock_until(chrono::time_point<Clock, Duration> const& absolute_time);
+ template<class Rep, class Period >
+ void lock_for(chrono::duration<Rep, Period> const& relative_time);
+
+ void unlock();
+
+ bool try_lock();
+ template<class Clock, class Duration >
+ bool try_lock_until(chrono::time_point<Clock, Duration> const& absolute_time);
+ template<class Rep, class Period >
+ bool try_lock_for(chrono::duration<Rep, Period> const& relative_time);
+
+ };
+
+
+[*Description]
+
+[*`unique_array_locker` template parameters]
+
+* `Lockable` : The exclusive lockable type used to synchronize exclusive access
+* `N` : The number of lockables in the array
+
+[*`unique_array_locker` public types]
+
+* `lockable_type` : The exclusive lockable type used to synchronize exclusive access
+* `lock_error` : The exception type throw in case of errors
+* `bool_type` : The bool_type of the safe_bool idiom
+
+
+[*`unique_array_locker` private and not defined member functions]
+
+* `unique_array_locker()`
+* `unique_array_locker(unique_array_locker&);`
+* `operator=(unique_array_locker&);`
+
+[endsect]
+
+[section Template Class `try_unique_array_locker<>`]
+[*Synopsis]
+
+[endsect]
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/lock.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/lock.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,44 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:lock_hpp Header `<boost/sychro/lockable/lock.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock__ which locks the __Lockable__ passed as parameter.
+The default implementation applies the __lock__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock__ free function if the __Lockable__ do not provides a __lock__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock__
+member function, __lock__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct lock {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template<typename Lockable> struct lock {
+ static typename result_of::template lock<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template lock<Lockable>::type
+ lock(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/lock_for.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/lock_for.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,46 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:lock_for_hpp Header `<boost/sychro/lockable/lock_for.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_for__ which lock the __Lockable__ passed as parameter until a given time is elapsed.
+The default implementation applies the __lock_for__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_for__ free function if the __Lockable__ do not provides a __lock_for__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_for__
+member function, __lock_for__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct lock_for {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Rep, class Period >
+ struct lock_for {
+ static typename result_of::template lock_for<Lockable>::type
+ apply( Lockable& lockable, const chrono::duration<Rep, Period>& rel_time );
+ };
+ }
+
+ template <typename Lockable, class Rep, class Period >
+ typename result_of::template lock_for<Lockable>::type
+ lock_for(Lockable& lockable, const chrono::duration<Rep, Period>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/lock_shared.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/lock_shared.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:lock_shared_hpp Header `<boost/sychro/lockable/lock_shared.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_shared__ which lock shared the __Lockable__ passed as parameter.
+The default implementation applies the __lock_shared__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_shared__ free function if the __Lockable__ do not provides a __lock_shared__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_shared__
+member function, __lock_shared__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct lock_shared {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct lock_shared {
+ static typename result_of::template lock_shared<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template lock_shared<Lockable>::type
+ lock_shared(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/lock_shared_for.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/lock_shared_for.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:lock_shared_for_hpp Header `<boost/sychro/lockable/lock_shared_for.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_shared_for__ which locks shared the __Lockable__ passed as parameter until a given time is elepsed.
+The default implementation applies the __lock_shared_for__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_shared_for__ free function if the __Lockable__ do not provides a __lock_shared_for__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_shared_for__
+member function, __lock_shared_for__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Rep, class Period >
+ struct lock_shared_for {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Rep, class Period >
+ struct lock_shared_for {
+ static typename result_of::template lock_shared_for<Lockable,Rep,Period>::type
+ apply( Lockable& lockable, const chrono::duration<Rep, Period>& rel_time );
+ };
+ }
+
+ template <typename Lockable, class Rep, class Period >
+ typename result_of::template lock_shared_for<Lockable,Rep,Period>::type
+ lock_shared_for(Lockable& lockable, const chrono::duration<Rep, Period>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/lock_shared_until.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/lock_shared_until.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:lock_shared_until_hpp Header `<boost/sychro/lockable/lock_shared_until.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_shared_until__ which locks shared the __Lockable__ passed as parameter until a given time is reached.
+The default implementation applies the __lock_shared_until__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_shared_until__ free function if the __lock_shared_untilable__ do not provides a __lock_shared_until__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_shared_until__
+member function, __lock_shared_until__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Clock, class Duration >
+ struct lock_shared_until {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Clock, class Duration >
+ struct lock_shared_until {
+ static typename result_of::template lock_shared_until<Lockable,Clock,Duration>::type
+ apply( Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time );
+ };
+ }
+
+ template <typename Lockable, class Clock, class Duration >
+ typename result_of::template lock_shared_until<Lockable,Clock,Duration>::type
+ lock_shared_until(Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/lock_until.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/lock_until.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:lock_until_hpp Header `<boost/sychro/lockable/lock_until.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_until__ which lock the __Lockable__ passed as parameter until a given time is reached.
+The default implementation applies the __lock_until__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_until__ free function if the __lock_untilable__ do not provides a __lock_until__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_until__
+member function, __lock_until__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Clock, class Duration >
+ struct lock_until {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Clock, class Duration >
+ struct lock_until {
+ static typename result_of::template lock_until<Lockable,Clock,Duration>::type
+ apply( Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time );
+ };
+ }
+
+ template <typename Lockable, class Clock, class Duration >
+ typename result_of::template lock_until<Lockable,Clock,Duration>::type
+ lock_until(Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/lock_upgrade.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/lock_upgrade.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:lock_upgrade_hpp Header `<boost/sychro/lockable/lock_upgrade.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_upgrade__ which lock upgrade the __Lockable__ passed as parameter.
+The default implementation applies the __lock_upgrade__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_upgrade__ free function if the __Lockable__ do not provides a __lock_upgrade__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_upgrade__
+member function, __lock_upgrade__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct lock_upgrade {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct lock_upgrade {
+ static typename result_of::template lock_upgrade<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template lock_upgrade<Lockable>::type
+ lock_upgrade(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/lock_upgrade_for.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/lock_upgrade_for.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:lock_upgrade_for_hpp Header `<boost/sychro/lockable/lock_upgrade_for.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_upgrade_for__ which locks shared the __Lockable__ passed as parameter until a given time is elepsed.
+The default implementation applies the __lock_upgrade_for__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_upgrade_for__ free function if the __Lockable__ do not provides a __lock_upgrade_for__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_upgrade_for__
+member function, __lock_upgrade_for__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Rep, class Period >
+ struct lock_upgrade_for {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Rep, class Period >
+ struct lock_upgrade_for {
+ static typename result_of::template lock_upgrade_for<Lockable,Rep,Period>::type
+ apply( Lockable& lockable, const chrono::duration<Rep, Period>& rel_time );
+ };
+ }
+
+ template <typename Lockable, class Rep, class Period >
+ typename result_of::template lock_upgrade_for<Lockable,Rep,Period>::type
+ lock_upgrade_for(Lockable& lockable, const chrono::duration<Rep, Period>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/lock_upgrade_until.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/lock_upgrade_until.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:lock_upgrade_until_hpp Header `<boost/sychro/lockable/lock_upgrade_until.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_shared_until__ which locks shared the __Lockable__ passed as parameter until a given time is reached.
+The default implementation applies the __lock_shared_until__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_shared_until__ free function if the __lock_shared_untilable__ do not provides a __lock_shared_until__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_shared_until__
+member function, __lock_shared_until__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Clock, class Duration >
+ struct lock_upgrade_until {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Clock, class Duration >
+ struct lock_upgrade_until {
+ static typename result_of::template lock_upgrade_until<Lockable,Clock,Duration>::type
+ apply( Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time );
+ };
+ }
+
+ template <typename Lockable, class Clock, class Duration >
+ typename result_of::template lock_upgrade_until<Lockable,Clock,Duration>::type
+ lock_upgrade_until(Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_lock_hpp Header `<boost/sychro/lockable/try_lock.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __try_lock__ which try to lock the __Lockable__ passed as parameter and return false if unsucessful.
+The default implementation applies the __try_lock__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __try_lock__ free function if the __Lockable__ do not provides a __try_lock__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __try_lock__
+member function, __try_lock__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct try_lock {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct try_lock {
+ static typename result_of::template try_lock<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template try_lock<Lockable>::type
+ try_lock(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_for.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_for.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_lock_for_hpp Header `<boost/sychro/lockable/try_lock_for.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __try_lock_for__ which tries to locks the __Lockable__ passed as parameter until a given time is elapsed.
+The default implementation applies the __try_lock_for__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __try_lock_for__ free function if the __Lockable__ do not provides a __try_lock_for__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __try_lock_for__
+member function, __try_lock_for__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Rep, class Period >
+ struct try_lock_for {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Rep, class Period >
+ struct try_lock_for {
+ static typename result_of::template try_lock_for<Lockable,Rep,Period>::type
+ apply( Lockable& lockable, const chrono::duration<Rep, Period>& rel_time );
+ };
+ }
+
+ template <typename Lockable, class Rep, class Period >
+ typename result_of::template try_lock_for<Lockable,Rep,Period>::type
+ try_lock_for(Lockable& lockable, const chrono::duration<Rep, Period>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_shared.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_shared.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_lock_shared_hpp Header `<boost/sychro/lockable/try_lock_shared.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __try_lock_shared__ which try to lock the __Lockable__ passed as parameter and return false if unsucessful.
+The default implementation applies the __try_lock_shared__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __try_lock_shared__ free function if the __Lockable__ do not provides a __try_lock_shared__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __try_lock_shared__
+member function, __try_lock_shared__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct try_lock_shared_shared {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct try_lock_shared {
+ static typename result_of::template try_lock_shared<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template try_lock_shared<Lockable>::type
+ try_lock_shared(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_shared_for.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_shared_for.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_lock_shared_for_hpp Header `<boost/sychro/lockable/try_lock_shared_for.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __try_lock_shared_for__ which tries to locks the __Lockable__ passed as parameter until a given time is elapsed.
+The default implementation applies the __try_lock_shared_for__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __try_lock_shared_for__ free function if the __Lockable__ do not provides a __try_lock_shared_for__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __try_lock_shared_for__
+member function, __try_lock_shared_for__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Rep, class Period >
+ struct try_lock_shared_for {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Rep, class Period >
+ struct try_lock_shared_for {
+ static typename result_of::template try_lock_shared_for<Lockable,Rep,Period>::type
+ apply( Lockable& lockable, const chrono::duration<Rep, Period>& rel_time );
+ };
+ }
+
+ template <typename Lockable, class Rep, class Period >
+ typename result_of::template try_lock_shared_for<Lockable,Rep,Period>::type
+ try_lock_shared_for(Lockable& lockable, const chrono::duration<Rep, Period>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_until.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_until.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_lock_until_hpp Header `<boost/sychro/lockable/try_lock_until.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_shared_until__ which locks shared the __Lockable__ passed as parameter until a given time is reached.
+The default implementation applies the __lock_shared_until__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_shared_until__ free function if the __lock_shared_untilable__ do not provides a __lock_shared_until__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_shared_until__
+member function, __lock_shared_until__ calls to the static operation apply on a class with the same name in the namespace unlock_upgrade_and_lock_until.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Clock, class Duration >
+ struct try_lock_until {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Clock, class Duration >
+ struct try_lock_until {
+ static typename result_of::template try_lock_until<Lockable,Clock,Duration>::type
+ apply( Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time );
+ };
+ }
+
+ template <typename Lockable, class Clock, class Duration >
+ typename result_of::template try_lock_until<Lockable,Clock,Duration>::type
+ try_lock_until(Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_upgrade.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_upgrade.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_lock_upgrade_hpp Header `<boost/sychro/lockable/try_lock_upgrade.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __try_lock_upgrade__ which try to lock the __Lockable__ passed as parameter and return false if unsucessful.
+The default implementation applies the __try_lock_upgrade__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __try_lock_upgrade__ free function if the __Lockable__ do not provides a __try_lock_upgrade__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __try_lock_upgrade__
+member function, __try_lock_upgrade__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct try_lock_upgrade_shared {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct try_lock_upgrade {
+ static typename result_of::template try_lock_upgrade<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template try_lock_upgrade<Lockable>::type
+ try_lock_upgrade(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_upgrade_until.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_lock_upgrade_until.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_lock_upgrade_until_hpp Header `<boost/sychro/lockable/try_lock_upgrade_until.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_shared_until__ which locks shared the __Lockable__ passed as parameter until a given time is reached.
+The default implementation applies the __lock_shared_until__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_shared_until__ free function if the __lock_shared_untilable__ do not provides a __lock_shared_until__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_shared_until__
+member function, __lock_shared_until__ calls to the static operation apply on a class with the same name in the namespace unlock_upgrade_and_lock_until.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Clock, class Duration >
+ struct try_lock_upgrade_until {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Clock, class Duration >
+ struct try_lock_upgrade_until {
+ static typename result_of::template try_lock_upgrade_until<Lockable,Clock,Duration>::type
+ apply( Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time );
+ };
+ }
+
+ template <typename Lockable, class Clock, class Duration >
+ typename result_of::template try_lock_upgrade_until<Lockable,Clock,Duration>::type
+ try_lock_upgrade_until(Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_shared_and_lock.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_shared_and_lock.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_unlock_shared_and_lock_hpp Header `<boost/sychro/lockable/try_unlock_shared_and_lock_hpp.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __try_lock_upgrade__ which try to lock the __Lockable__ passed as parameter and return false if unsucessful.
+The default implementation applies the __try_lock_upgrade__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __try_lock_upgrade__ free function if the __Lockable__ do not provides a __try_lock_upgrade__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __try_lock_upgrade__
+member function, __try_lock_upgrade__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct try_unlock_shared_and_lock {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct try_lock_upgrade {
+ static typename result_of::template try_lock_upgrade<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template try_lock_upgrade<Lockable>::type
+ try_lock_upgrade(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_shared_and_lock_upgrade.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_shared_and_lock_upgrade.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_unlock_shared_and_lock_upgrade_hpp Header `<boost/sychro/lockable/try_unlock_shared_and_lock_upgrade.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __try_unlock_shared_and_lock_upgrade__ which try to lock the __Lockable__ passed as parameter and return false if unsucessful.
+The default implementation applies the __try_unlock_shared_and_lock_upgrade__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __try_unlock_shared_and_lock_upgrade__ free function if the __Lockable__ do not provides a __try_unlock_shared_and_lock_upgrade__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __try_unlock_shared_and_lock_upgrade__
+member function, __try_unlock_shared_and_lock_upgrade__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct try_unlock_shared_and_lock_upgrade_shared {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct try_unlock_shared_and_lock_upgrade {
+ static typename result_of::template try_unlock_shared_and_lock_upgrade<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template try_unlock_shared_and_lock_upgrade<Lockable>::type
+ try_unlock_shared_and_lock_upgrade(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_upgrade_and_lock_for.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_upgrade_and_lock_for.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_unlock_upgrade_and_lock_for_hpp Header `<boost/sychro/lockable/try_unlock_upgrade_and_lock_for.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __try_unlock_upgrade_and_lock_until__ which tries to locks the __Lockable__ passed as parameter until a given time is elapsed.
+The default implementation applies the __try_unlock_upgrade_and_lock_until__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __try_unlock_upgrade_and_lock_until__ free function if the __Lockable__ do not provides a __try_unlock_upgrade_and_lock_until__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __try_unlock_upgrade_and_lock_until__
+member function, __try_unlock_upgrade_and_lock_until__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Rep, class Period >
+ struct try_unlock_upgrade_and_lock_until {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Rep, class Period >
+ struct try_unlock_upgrade_and_lock_until {
+ static typename result_of::template try_unlock_upgrade_and_lock_until<Lockable,Rep,Period>::type
+ apply( Lockable& lockable, const chrono::duration<Rep, Period>& rel_time );
+ };
+ }
+
+ template <typename Lockable, class Rep, class Period >
+ typename result_of::template try_unlock_upgrade_and_lock_until<Lockable,Rep,Period>::type
+ try_unlock_upgrade_and_lock_until(Lockable& lockable, const chrono::duration<Rep, Period>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_upgrade_and_lock_until.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/try_unlock_upgrade_and_lock_until.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:try_unlock_upgrade_and_lock_until_hpp Header `<boost/sychro/lockable/try_unlock_upgrade_and_lock_until.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_shared_until__ which locks shared the __Lockable__ passed as parameter until a given time is reached.
+The default implementation applies the __lock_shared_until__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_shared_until__ free function if the __lock_shared_untilable__ do not provides a __lock_shared_until__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_shared_until__
+member function, __lock_shared_until__ calls to the static operation apply on a class with the same name in the namespace unlock_upgrade_and_lock_until.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Clock, class Duration >
+ struct try_unlock_upgrade_and_lock_until {
+ typedef bool type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Clock, class Duration >
+ struct try_unlock_upgrade_and_lock_until {
+ static typename result_of::template try_unlock_upgrade_and_lock_until<Lockable,Clock,Duration>::type
+ apply( Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time );
+ };
+ }
+
+ template <typename Lockable, class Clock, class Duration >
+ typename result_of::template try_unlock_upgrade_and_lock_until<Lockable,Clock,Duration>::type
+ try_unlock_upgrade_and_lock_until(Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_hpp Header `<boost/sychro/lockable/unlock.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __unlock__ which lock upgrade the __Lockable__ passed as parameter.
+The default implementation applies the __unlock__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __unlock__ free function if the __Lockable__ do not provides a __unlock__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __unlock__
+member function, __unlock__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct unlock {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct unlock {
+ static typename result_of::template unlock<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template unlock<Lockable>::type
+ unlock(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_and_lock_shared.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_and_lock_shared.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_and_lock_shared_hpp Header `<boost/sychro/lockable/unlock_and_lock_shared.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __unlock_and_lock_shared__ which lock upgrade the __Lockable__ passed as parameter.
+The default implementation applies the __unlock_and_lock_shared__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __unlock_and_lock_shared__ free function if the __Lockable__ do not provides a __unlock_and_lock_shared__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __unlock_and_lock_shared__
+member function, __unlock_and_lock_shared__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct unlock_and_lock_shared {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct unlock_and_lock_shared {
+ static typename result_of::template unlock_and_lock_shared<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template unlock_and_lock_shared<Lockable>::type
+ unlock_and_lock_shared(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_and_lock_upgrade.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_and_lock_upgrade.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_and_lock_upgrade_hpp Header `<boost/sychro/lockable/unlock_and_lock_upgrade.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __unlock_and_lock_upgrade__ which lock upgrade the __Lockable__ passed as parameter.
+The default implementation applies the __unlock_and_lock_upgrade__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __unlock_and_lock_upgrade__ free function if the __Lockable__ do not provides a __unlock_and_lock_upgrade__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __unlock_and_lock_upgrade__
+member function, __unlock_and_lock_upgrade__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct unlock_and_lock_upgrade {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct unlock_and_lock_upgrade {
+ static typename result_of::template unlock_and_lock_upgrade<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template unlock_and_lock_upgrade<Lockable>::type
+ unlock_and_lock_upgrade(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_shared.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_shared.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_shared_hpp Header `<boost/sychro/lockable/unlock_shared.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __unlock_shared__ which lock upgrade the __Lockable__ passed as parameter.
+The default implementation applies the __unlock_shared__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __unlock_shared__ free function if the __Lockable__ do not provides a __unlock_shared__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __unlock_shared__
+member function, __unlock_shared__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct unlock_shared {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct unlock_shared {
+ static typename result_of::template unlock_shared<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template unlock_shared<Lockable>::type
+ unlock_shared(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_shared_and_lock.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_shared_and_lock.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_shared_and_lock_hpp Header `<boost/sychro/lockable/unlock_shared_and_lock.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __unlock_shared_and_lock__ which lock upgrade the __Lockable__ passed as parameter.
+The default implementation applies the __unlock_shared_and_lock__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __unlock_shared_and_lock__ free function if the __Lockable__ do not provides a __unlock_shared_and_lock__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __unlock_shared_and_lock__
+member function, __unlock_shared_and_lock__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct unlock_shared_and_lock {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct unlock_shared_and_lock {
+ static typename result_of::template unlock_shared_and_lock<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template unlock_shared_and_lock<Lockable>::type
+ unlock_shared_and_lock(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_upgrade_hpp Header `<boost/sychro/lockable/unlock_upgrade.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __unlock_upgrade__ which lock upgrade the __Lockable__ passed as parameter.
+The default implementation applies the __unlock_upgrade__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __unlock_upgrade__ free function if the __Lockable__ do not provides a __unlock_upgrade__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __unlock_upgrade__
+member function, __unlock_upgrade__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct unlock_upgrade {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct unlock_upgrade {
+ static typename result_of::template unlock_upgrade<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template unlock_upgrade<Lockable>::type
+ unlock_upgrade(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_upgrade_and_lock_hpp Header `<boost/sychro/lockable/unlock_upgrade_and_lock.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __unlock_upgrade_and_lock__ which lock upgrade the __Lockable__ passed as parameter.
+The default implementation applies the __unlock_upgrade_and_lock__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __unlock_upgrade_and_lock__ free function if the __Lockable__ do not provides a __unlock_upgrade_and_lock__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __unlock_upgrade_and_lock__
+member function, __unlock_upgrade_and_lock__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct unlock_upgrade_and_lock {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct unlock_upgrade_and_lock {
+ static typename result_of::template unlock_upgrade_and_lock<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template unlock_upgrade_and_lock<Lockable>::type
+ unlock_upgrade_and_lock(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock_for.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock_for.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_upgrade_and_lock_for_hpp Header `<boost/sychro/lockable/unlock_upgrade_and_lock_for.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __unlock_upgrade_and_lock_for__ which locks shared the __Lockable__ passed as parameter until a given time is elepsed.
+The default implementation applies the __unlock_upgrade_and_lock_for__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __unlock_upgrade_and_lock_for__ free function if the __Lockable__ do not provides a __unlock_upgrade_and_lock_for__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __unlock_upgrade_and_lock_for__
+member function, __unlock_upgrade_and_lock_for__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Rep, class Period >
+ struct unlock_upgrade_and_lock_for {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Rep, class Period >
+ struct unlock_upgrade_and_lock_for {
+ static typename result_of::template unlock_upgrade_and_lock_for<Lockable,Rep,Period>::type
+ apply( Lockable& lockable, const chrono::duration<Rep, Period>& rel_time );
+ };
+ }
+
+ template <typename Lockable, class Rep, class Period >
+ typename result_of::template unlock_upgrade_and_lock_for<Lockable,Rep,Period>::type
+ unlock_upgrade_and_lock_for(Lockable& lockable, const chrono::duration<Rep, Period>& abs_time);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock_shared.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock_shared.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,45 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_upgrade_and_lock_shared_hpp Header `<boost/sychro/lockable/unlock_upgrade_and_lock_shared.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __unlock_upgrade_and_lock_shared__ which lock upgrade the __Lockable__ passed as parameter.
+The default implementation applies the __unlock_upgrade_and_lock_shared__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __unlock_upgrade_and_lock_shared__ free function if the __Lockable__ do not provides a __unlock_upgrade_and_lock_shared__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __unlock_upgrade_and_lock_shared__
+member function, __unlock_upgrade_and_lock_shared__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable> struct unlock_upgrade_and_lock_shared {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template< typename Lockable >
+ struct unlock_upgrade_and_lock_shared {
+ static typename result_of::template unlock_upgrade_and_lock_shared<Lockable>::type apply( Lockable& lockable );
+ };
+ }
+
+ template <typename Lockable>
+ typename result_of::template unlock_upgrade_and_lock_shared<Lockable>::type
+ unlock_upgrade_and_lock_shared(Lockable& lockable);
+ }}}
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock_until.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable/unlock_upgrade_and_lock_until.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -0,0 +1,47 @@
+[/
+ (C) Copyright 2009 Vicente J. Botet Escriba
+ 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:unlock_upgrade_and_lock_until_hpp Header `<boost/sychro/lockable/unlock_upgrade_and_lock_until.hpp>`]
+[/==========================================================================================]
+
+Defines a free function __lock_shared_until__ which locks shared the __Lockable__ passed as parameter until a given time is reached.
+The default implementation applies the __lock_shared_until__ member function to the __Lockable__.
+A user adapting another __Lockable__ could need
+to specialize the __lock_shared_until__ free function if the __lock_shared_untilable__ do not provides a __lock_shared_until__ member function
+with the same prototype.
+
+As for the moment we can not partially specialize a function a trick is used: instead of calling directly
+to the __lock_shared_until__
+member function, __lock_shared_until__ calls to the static operation apply on a class with the same name in the namespace unlock_upgrade_and_lock_until.
+So the user can specialize partially this class.
+
+
+ namespace boost { namespace synchro { namespace lockable {
+ namespace result_of {
+ template <typename Lockable, class Clock, class Duration >
+ struct lock_upgrade_until {
+ typedef void type;
+ };
+ }
+
+ namespace partial_specialization_workaround {
+ template <typename Lockable, class Clock, class Duration >
+ struct lock_upgrade_until {
+ static typename result_of::template lock_upgrade_until<Lockable,Clock,Duration>::type
+ apply( Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time );
+ };
+ }
+
+ template <typename Lockable, class Clock, class Duration >
+ typename result_of::template lock_upgrade_until<Lockable,Clock,Duration>::type
+ lock_upgrade_until(Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time);
+ }}}
+
+
+
+[endsect]

Modified: sandbox/synchro/libs/synchro/doc/reference/lockable_concept.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/reference/lockable_concept.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable_concept.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -35,9 +35,9 @@
         typedef typename naming_tag<Lockable>::type naming;
 
         BOOST_CONCEPT_USAGE(LockableConcept) {
- l.lock();
- l.unlock();
- l.try_lock();
+ lockable::lock(l);
+ lockable::unlock(l);
+ lockable::try_lock(l);
         }
         Lockable& l;
     };
@@ -52,13 +52,13 @@
         BOOST_CONCEPT_ASSERT((LockableConcept<Lockable>));
 
         BOOST_CONCEPT_USAGE(TimedLockableConcept) {
- l.lock_until(t);
- l.lock_for(boost::posix_time::seconds(1));
- l.try_lock_until(t);
- l.try_lock_for(boost::posix_time::seconds(1));
+ lockable::lock_until(l, t);
+ lockable::lock_for(l, boost::chrono::seconds(1));
+ lockable::try_lock_until(l, t);
+ lockable::try_lock_for(l, boost::chrono::seconds(1));
         }
         Lockable& l;
- system_time t;
+ boost::chrono::system_clock::time_point t;
     };
 
 [endsect]
@@ -71,16 +71,16 @@
         BOOST_CONCEPT_ASSERT((TimedLockableConcept<Lockable>));
 
         BOOST_CONCEPT_USAGE(ShareLockableConcept) {
- l.lock_shared();
- l.lock_shared_until(t);
- l.lock_shared_for(boost::posix_time::seconds(1));
- l.try_lock_shared();
- l.try_lock_shared_until(t);
- l.try_lock_shared_for(boost::posix_time::seconds(1));
- l.unlock_shared();
+ lockable::lock_shared(l);
+ lockable::lock_shared_until(l, t);
+ lockable::lock_shared_for(l, boost::chrono::seconds(1));
+ lockable::try_lock_shared(l);
+ lockable::try_lock_shared_until(l, t);
+ lockable::try_lock_shared_for(l, boost::chrono::seconds(1));
+ lockable::unlock_shared(l);
         }
         Lockable& l;
- system_time t;
+ boost::chrono::system_clock::time_point t;
     };
 
 
@@ -95,19 +95,19 @@
         BOOST_CONCEPT_ASSERT((ShareLockableConcept<Lockable>));
 
         BOOST_CONCEPT_USAGE(UpgradeLockableConcept) {
- l.lock_upgrade();
- l.lock_upgrade_until(t);
- l.lock_upgrade_for(boost::posix_time::seconds(1));
- l.try_lock_upgrade();
- l.try_lock_upgrade_until(t);
- l.try_lock_upgrade_for(boost::posix_time::seconds(1));
- l.unlock_upgrade_and_lock();
- l.unlock_and_lock_upgrade();
- l.unlock_and_lock_shared();
- l.unlock_upgrade_and_lock_shared();
+ lockable::lock_upgrade(l);
+ //lockable::lock_upgrade_until(l, t);
+ //lockable::lock_upgrade_for(l, boost::chrono::seconds(1));
+ lockable::try_lock_upgrade(l);
+ //lockable::try_lock_upgrade_until(l, t);
+ //lockable::try_lock_upgrade_for(l,boost::chrono::seconds(1));
+ lockable::unlock_upgrade_and_lock(l);
+ lockable::unlock_and_lock_upgrade(l);
+ lockable::unlock_and_lock_shared(l);
+ lockable::unlock_upgrade_and_lock_shared(l);
         }
         Lockable& l;
- system_time t;
+ boost::chrono::system_clock::time_point t;
     };
 
 

Modified: sandbox/synchro/libs/synchro/doc/references.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/references.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/references.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -56,6 +56,11 @@
     [Douglas C. Schmidt]
 ]
 
+[
+ [[@http://www.daimi.au.dk/~beta/Books/index.html
+ [*Object-Oriented Programming in the BETA Programming Language ]]]
+ [Ole Lehrmann Madsen, Birger Moller-Pedersen, Kristen Nygaard]
+]
   
 ]
 

Modified: sandbox/synchro/libs/synchro/doc/synchro.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/synchro.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/synchro.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -38,6 +38,43 @@
 In addition to the expressions defined in [concept], the following expressions must be valid.
 ]
 
+
+[def __lock__ `lock`]
+[def __unlock__ `unlock`]
+[def __try_lock__ `try_lock`]
+[def __lock_until__ `lock_until`]
+[def __lock_for__ `lock_for`]
+[def __try_lock_until__ `try_lock_until`]
+[def __try_lock_for__ `try_lock_for`]
+[def __lock_shared__ `lock_shared`]
+[def __try_lock_shared__ `try_lock_shared`]
+[def __unlock_shared__ `unlock_shared`]
+[def __lock_shared_until__ `lock_shared_until`]
+[def __lock_shared_for__ `lock_shared_for`]
+[def __try_lock_shared_until__ `try_lock_shared_until`]
+[def __try_lock_shared_for__ `try_lock_shared_for`]
+[def __lock_upgrade__ `lock_upgrade`]
+[def __lock_upgrade_until__ `lock_upgrade_until`]
+[def __lock_upgrade_for__ `lock_upgrade_for`]
+[def __try_lock_upgrade__ `try_lock_upgrade`]
+[def __try_lock_upgrade_until__ `try_lock_upgrade_until`]
+[def __try_lock_upgrade_for__ `try_lock_upgrade_for`]
+[def __unlock_upgrade__ `unlock_upgrade`]
+[def __unlock_and_lock_upgrade__ `unlock_and_lock_upgrade`]
+[def __unlock_and_lock_shared__ `unlock_and_lock_shared`]
+[def __unlock_upgrade_and_lock_shared__ `unlock_upgrade_and_lock_shared`]
+[def __unlock_upgrade_and_lock__ `unlock_upgrade_and_lock`]
+[def __unlock_upgrade_and_lock_until__ `unlock_upgrade_and_lock_until`]
+[def __unlock_upgrade_and_lock_for__ `unlock_upgrade_and_lock_for`]
+[def __try_unlock_upgrade_and_lock__ `try_unlock_upgrade_and_lock`]
+[def __try_unlock_upgrade_and_lock_until__ `try_unlock_upgrade_and_lock_until`]
+[def __try_unlock_upgrade_and_lock_for__ `try_unlock_upgrade_and_lock_for`]
+[def __unlock_shared_and_lock__ `unlock_shared_and_lock`]
+[def __try_unlock_shared_and_lock__ `try_unlock_shared_and_lock`]
+[def __try_unlock_shared_and_lock_upgrade__ `try_unlock_shared_and_lock_upgrade`]
+[def __Lockable__ `Lockable`]
+
+
 [/
 [section Preface]
 

Modified: sandbox/synchro/libs/synchro/doc/tutorial.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/tutorial.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/tutorial.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -9,6 +9,8 @@
 
 [section:tutorial Tutorial]
 
+[info The contents of this tutorial is an adaptation of the papers of Andrei Alexandrescu, Kevlin Henney and the concurrent part of the BETA Programming Language.]
+
 Concurrent components may interact in different ways: they may access the same shared objects by, for example, executing functions of these objects; or they may communicate directly by executing functions of each other.
 
 Concurrent execution of objects requires a mechanism for synchronizing the access to shared objects, just as direct communication between objects may require synchronization. The basic mechanism for synchronization in Boost.Threads and Boost.Interprocess are the well known mutex and condition_variables. Mutexes and condition variables are, however, only useful for very simple synchronization problems. The Synchro Library therefore introduce high-level abstractions for handling more complicated synchronization problems, including monitor for guaranteeing exclusive access to an object, controlling external locking and last a so-called rendezvous mechanism for handling direct communication between objects. All the concurrency abstractions being introduced are defined by means of mutexes an conditions.

Modified: sandbox/synchro/libs/synchro/doc/tutorial/external_locking.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/tutorial/external_locking.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/tutorial/external_locking.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -10,8 +10,8 @@
 [section External Locking -- `strict_locker` and `externally_locked` classes]
 
 
-This tutorial is an adaptation of the article of Andrei Alexandrescu "Multithreading and the C++ Type System"
-to the Boost library.
+[note This tutorial is an adaptation of the paper of Andrei Alexandrescu "Multithreading and the C++ Type System"
+to the Boost library.]
 
 [/
 [section Internal locking]

Modified: sandbox/synchro/libs/synchro/doc/tutorial/internal_locking.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/tutorial/internal_locking.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/tutorial/internal_locking.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -7,7 +7,7 @@
 
 
 [section Internal Locking--Monitors]
-
+[note This tutorial is an adaptation of chapter Concurrency of the Object-Oriented Programming in the BETA Programming Language and of the paper of Andrei Alexandrescu "Multithreading and the C++ Type System" to the Boost library.]
 [section Concurrent threads of execution]
 
 Consider, for example, modeling a bank account class that supports simultaneous deposits and withdrawals from multiple locations (arguably the "Hello, World" of multithreaded programming).

Modified: sandbox/synchro/libs/synchro/doc/tutorial/lockable.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/tutorial/lockable.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/tutorial/lockable.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -6,7 +6,7 @@
  /]
 
 [section Lockables]
-The following is an adaptation of the article "C++ Threading - A Generic-Programming Approach" by Kevin Henney.
+[note The following is an adaptation of the article "C++ Threading - A Generic-Programming Approach" by Kevin Henney.]
 
 [*Lock substitutability]
 

Modified: sandbox/synchro/libs/synchro/doc/tutorial/rendezvous.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/tutorial/rendezvous.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/tutorial/rendezvous.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -6,7 +6,7 @@
  /]
 
 [section Concurrent components]
-
+[note This tutorial is an adaptation of chapter Concurrency of the Object-Oriented Programming in the BETA Programming Language to the Boost library.]
 [section Direct communication between components]
 
 In the previous section we have described a mechanism for concurrent components to communicate through shared objects. In many cases it appears more natural for concurrent components to communicate directly instead of using shared objects. Consider the following example:

Modified: sandbox/synchro/libs/synchro/doc/tutorial/volatile_locking_ptr.qbk
==============================================================================
--- sandbox/synchro/libs/synchro/doc/tutorial/volatile_locking_ptr.qbk (original)
+++ sandbox/synchro/libs/synchro/doc/tutorial/volatile_locking_ptr.qbk 2009-03-18 19:15:52 EDT (Wed, 18 Mar 2009)
@@ -6,12 +6,10 @@
  / copy at http://www.boost.org/LICENSE_1_0.txt)
  /]
 
-
-
 [section `volatile ` and `locking_ptr`]
 
 
-This tutorial is an adaptation of the article of Andrei Alexandrescu "`volatile` - Multithreaded Programmer's Best Friend" to the Boost library.
+[note This tutorial is an adaptation of the article of Andrei Alexandrescu "`volatile` - Multithreaded Programmer's Best Friend" to the Boost library.]
 
 [section Just a Little Keyword]
 


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