Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51247 - sandbox/synchro/libs/synchro/doc/reference
From: vicente.botet_at_[hidden]
Date: 2009-02-14 07:56:23


Author: viboes
Date: 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
New Revision: 51247
URL: http://svn.boost.org/trac/boost/changeset/51247

Log:
Boost.Synchro V0.0.0
Added:
   sandbox/synchro/libs/synchro/doc/reference/adaptive_lock.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/concurrent_component.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/condition_backdoor.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/condition_lockable.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/condition_locker.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/condition_safe.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/externally_locked.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/is_strict_locker.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lock_adapter.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lock_generator.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable_adapter.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable_concept.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/lockable_traits.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/locker_concepts.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/locking_ptr.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/monitor.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/nested_reverse_locker.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/null_condition.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/null_mutex.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/null_synchronization_family.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/on_derreference_locking_ptr.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/poly_lock.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/process_synchronization_family.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/reverse_locker.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/semaphore.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/strict_locker.qbk (contents, props changed)
   sandbox/synchro/libs/synchro/doc/reference/thread_synchronization_family.qbk (contents, props changed)

Added: sandbox/synchro/libs/synchro/doc/reference/adaptive_lock.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/adaptive_lock.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,51 @@
+[/
+ / 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:poly_adaptive_lock_hpp Header `<boost/synchro/poly/adaptive_lock.hpp>`]
+[/==========================================================================================]
+
+[section Class `lock_adapter`]
+[*Synopsis]
+
+[*Description]
+
+More usefully for primitives, which are best left as
+non-polymorphic, an adaptor class can be used to provide the interface - run-time
+polymorphism - on behalf of anything supporting the correctly named functions -
+sometimes known as compile time polymorphism. It easier to take a nonpolymorphic
+class and adapt it to be polymorphic, than it is do it the other way
+around: the overhead and semantics of polymorphism can only introduced to a class,
+not removed.
+
+[*`lock_adapter` public member functions]
+
+# `;`
+
+[endsect]
+[section Class `adaptive_lock`]
+An adaptive general locking class that defers the decision of lockable type to run time.
+
+[*Synopsis]
+
+[*Description]
+
+This class, as locable, provide a set of general locking APIs.
+However, it defers our decision of what kind of lockable to use to the run time and delegates
+all locking operations to the actual lockable. Users must define a constructor in their subclass
+to initialize lock_.
+
+[*`adaptive_lock` public member functions]
+
+# `;`
+
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/concurrent_component.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/concurrent_component.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,104 @@
+[/
+ / 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:concurrent_component_hpp Header `<boost/synchro/conc/concurrent_component.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+ class port;
+ class object_port;
+ template <typename TYPE> class qualified_port;
+ class concurrent_component;
+ }}
+
+[section Class `port`]
+
+ class port {
+ public:
+ class synchronizer {
+ synchronizer(port& that);
+ ~synchronizer() {
+ };
+ port();
+ ~port();
+ void accept();
+ bool accept_until(const boost::posix_time::ptime &abs_time);
+ template<typename TimeDuration>
+ bool accept_for(TimeDuration const& rel_time);
+ };
+
+[endsect]
+
+[section Class `object_port`]
+
+ class object_port {
+ public:
+ class synchronizer {
+ synchronizer(object_port& that, const concurrent_component_base* snd);
+ ~synchronizer() {
+ };
+ object_port();
+ ~object_port();
+ void accept(const void* snd);
+ bool accept_until(const void* snd, const boost::posix_time::ptime &abs_time);
+ template<typename TimeDuration>
+ bool accept_for(const void* snd, TimeDuration const& rel_time);
+ };
+
+[endsect]
+
+[section Template Class `qualified_port`]
+
+ template <typename TYPE>
+ class qualified_port {
+ public:
+ class synchronizer {
+ synchronizer(qualified_port& that, const concurrent_component_base* snd);
+ ~synchronizer() {
+ };
+ object_port();
+ ~object_port();
+ void accept(const TYPE* snd);
+ bool accept_until(const TYPE* snd, const boost::posix_time::ptime &abs_time);
+ template<typename TimeDuration>
+ bool accept_for(const TYPE* snd, TimeDuration const& rel_time);
+ };
+
+[endsect]
+
+[section Class `concurrent_component`]
+
+ class concurrent_component
+ typedef unspecified port;
+ typedef unspecified object_port;
+ typedef unspecified qualified_port;
+
+ static void accept(port& p);
+ static void accept_until(const boost::posix_time::ptime &abs_time, port& p);
+ template<typename TimeDuration>
+ static bool accept_for(TimeDuration const& rel_time, port& p);
+
+ static void accept_all(port& p1, ..., port& pn);
+ static void accept_all_until(const boost::posix_time::ptime &abs_time, port& p1, ..., port& pn);
+ template<typename TimeDuration>
+ static void accept_all_for(TimeDuration const& rel_time, port& p1, ..., port& pn);
+
+ static void accept_any(port& p1, ..., port& pn);
+ static void accept_any_until(const boost::posix_time::ptime &abs_time, port& p1, ..., port& pn);
+ template<typename TimeDuration>
+ static void accept_any_for(TimeDuration const& rel_time, port& p1, ..., port& pn);
+
+ };
+
+[endsect]
+
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/condition_backdoor.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/condition_backdoor.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,44 @@
+[/
+ / Copyright (c) 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:condition_backdoor_hpp Header `<boost/synchro/condition_backdoor.hpp>`]
+[/==========================================================================================]
+
+ template <typename Condition> struct condition_backdoor;
+
+[section Template Class `condition_backdoor`]
+
+Condition Backdoor template. Used by safe lockers as condition_locker.
+
+ template <class Condition>
+ struct condition_backdoor {
+ condition_backdoor(condition_safe<Condition>&cnd);
+ template <typename Locker>
+ void wait(Locker& lock);
+ template <typename Locker>
+ bool wait_until(Locker& lock, boost::system_time const& abs_time);
+ template<typename Locker, typename duration_type>
+ bool wait_for(Locker& lock, duration_type const& rel_time);
+
+ template <typename Locker, typename Predicate>
+ void wait_when(Locker& lock, Predicate pred);
+ template<typename Locker, typename predicate_type>
+ bool wait_when_until(Locker& lock, predicate_type pred, boost::system_time const& abs_time);
+ template<typename Locker, typename predicate_type, typename duration_type>
+ bool wait_when_for(Locker& lock, predicate_type pred, duration_type const& rel_time);
+
+ template <typename Locker>
+ void notify_one(Locker& lock);
+ template <typename Locker>
+ void notify_all(Locker& lock);
+ };
+
+[endsect]
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/condition_lockable.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/condition_lockable.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,64 @@
+[/
+ / Copyright (c) 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:condition_lockable_hpp Header `<boost/synchro/condition_lockable.hpp>`]
+[/==========================================================================================]
+
+
+ namespace boost { namespace synchro {
+ template <typename Lockable, typename Condition>
+ class condition_lockable
+ typedef condition_lockable<thread_mutex> thread_condition_mutex;
+ typedef condition_lockable<interprocess_mutex> interprocess_condition_mutex;
+ }}
+
+[section Template Class `condition_lockable`]
+
+Allows a condition variable to be associated with a Lockable. Treating condition locking as a property of Lockable rather than viceversa has the benefit of making clear how something is locked and accessed, as it were emphasising it in the first person.
+
+Requiring the user of a condition variable to implement a while loop to verify a condition's predicate is potentially error prone. It can be better encapsulated by passing the predicate as a function object to the locking function.
+
+template <
+ typename Lockable=thread_mutex,
+ class Condition=condition_safe<typename best_condition<Lockable>::type >
+>
+class condition_lockable {
+ : public Lockable {
+ BOOST_CONCEPT_ASSERT((LockableConcept<Lockable>));
+public:
+ typedef Lockable lockable_type;
+ typedef Condition condition;
+
+ condition_lockable();
+ ~condition_lockable();
+
+ void relock_on(condition & cond);
+ void relock_on_until(condition & cond, boost::system_time const& abs_time);
+ template<typename duration_type>
+ void relock_on_for(condition & cond, duration_type const& rel_time);
+
+ template<typename Predicate>
+ void relock_when(condition &cond, Predicate pred);
+ template<typename Predicate>
+ void relock_when_until(condition &cond, Predicate pred,
+ boost::system_time const& abs_time);
+ template<typename Predicate, typename duration_type>
+ void relock_when_for(condition &cond, Predicate pred,
+ duration_type const& rel_time);
+
+private:
+ friend class boost::condition_variable;
+ friend class boost::condition_variable_any;
+ friend class boost::interprocess::condition;
+};
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/condition_locker.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/condition_locker.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,113 @@
+[/
+ / Copyright (c) 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:condition_locker_hpp Header `<boost/synchro/locker/condition_locker.hpp>`]
+[/==========================================================================================]
+
+ template <typename Condition> struct condition_backdoor;
+ template <typename Condition> class condition_safe;
+ template <typename Lockable, typename Condition>
+ class condition_unique_locker
+ template <typename Lockable, typename Condition>
+ class condition_shared_locker
+
+ template <typename Lockable, typename Condition>
+ class condition_unique_lockable
+ template <typename Lockable, typename Condition>
+ class condition_shared_lockable
+
+
+[section Template Class `condition_backdoor`]
+
+ template <class Condition>
+ struct condition_backdoor {
+ condition_backdoor(condition_safe<Condition>&cnd);
+ template <typename Locker>
+ void wait(Locker& lock);
+ template <typename Locker>
+ bool wait_until(Locker& lock, boost::system_time const& abs_time);
+ template<typename Locker, typename duration_type>
+ bool wait_for(Locker& lock, duration_type const& rel_time);
+
+ template <typename Locker, typename Predicate>
+ void wait_when(Locker& lock, Predicate pred);
+ template<typename Locker, typename predicate_type>
+ bool wait_when_until(Locker& lock, predicate_type pred, boost::system_time const& abs_time);
+ template<typename Locker, typename predicate_type, typename duration_type>
+ bool wait_when_for(Locker& lock, predicate_type pred, duration_type const& rel_time);
+
+ template <typename Locker>
+ void notify_one(Locker& lock);
+ template <typename Locker>
+ void notify_all(Locker& lock);
+ };
+
+[endsect]
+
+[section Template Class `condition_safe`]
+
+ template <class Condition>
+ class condition_safe {
+ public:
+ typedef Condition condition;
+ typedef condition_backdoor<Condition> backdoor;
+ void notify_one();
+ void notify_all();
+ };
+
+[endsect]
+
+[section Template Class `condition_unique_locker`]
+
+template <
+ typename Lockable,
+ class Condition=condition_safe<typename best_condition<Lockable>::type >
+>
+class condition_unique_locker
+ : protected unique_lock<Lockable>
+{
+ BOOST_CONCEPT_ASSERT((LockableConcept<Lockable>));
+public:
+ typedef Lockable lockable_type;
+ typedef Condition condition;
+
+ explicit condition_unique_locker(lockable_type& obj);
+ condition_unique_locker(lockable_type& obj, condition &cond);
+ template <typename Predicate>
+ condition_unique_locker(lockable_type& obj, condition &cond, Predicate pred);
+ ~condition_unique_locker();
+
+ typedef bool (condition_unique_locker::*bool_type)() const;
+ operator bool_type() const;
+ bool operator!() const;
+ bool owns_lock() const;
+ bool is_locking(lockable_type* l) const;
+
+ void relock_on(condition & cond);
+ void relock_until(condition & cond, boost::system_time const& abs_time);
+ template<typename duration_type>
+ void relock_on_for(condition & cond, duration_type const& rel_time);
+
+ template<typename Predicate>
+ void relock_when(condition &cond, Predicate pred);
+ template<typename Predicate>
+ void relock_when_until(condition &cond, Predicate pred,
+ boost::system_time const& abs_time);
+ template<typename Predicate, typename duration_type>
+ void relock_when_for(condition &cond, Predicate pred,
+ duration_type const& rel_time);
+
+ /*< no possibility to unlock without blocking on wait... >*/
+
+};
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/condition_safe.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/condition_safe.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,30 @@
+[/
+ / 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:condition_safe_hpp Header `<boost/synchro/locker/condition_safe.hpp>`]
+[/==========================================================================================]
+
+Wraps a condition variable in order make public only the safe functions, and let the others accesible via a backdoor.
+
+ template <typename Condition> class condition_safe;
+
+[section Template Class `condition_safe`]
+
+ template <class Condition>
+ class condition_safe {
+ public:
+ typedef Condition condition;
+ typedef condition_backdoor<Condition> backdoor;
+ void notify_one();
+ void notify_all();
+ };
+
+[endsect]
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/externally_locked.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/externally_locked.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,57 @@
+[/
+ / 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:externally_locked_hpp Header `<boost/synchro/locker/externally_locked.hpp>`]
+[/==========================================================================================]
+
+
+[section Template Class `externally_locked`]
+[*Synopsis]
+
+ template <class T, class Lockable>
+ class externally_locked {
+ public:
+ externally_locked(Lockable& owner);
+ externally_locked(const T& obj, Lockable& own);
+
+ template <typename Locker>
+ T& get(Locker& locker);
+ void set(const T& obj, Lockable& owner);
+ };
+
+[*Description]
+`externally_locked` cloaks an object of type T, and actually provides full access to that object through
+the get and set member functions, provided you pass a reference to a strict_locker<Lockable> object.
+
+[*`externally_locked` template parameters]
+
+* `T` : the type locked externally
+* `Lockable` : The lockable type used to synchronize the access to a T instance
+
+[*`externally_locked` public member functions]
+
+* `template <typename Locker> T& get(Locker& locker);`
+
+[*Requires:] mpl:and_<is_strict_locker<Locker>, is_same<lockable_type_trait<Locker>, Lockable>.
+
+[*Returns:] a reference to the type locked externally.
+
+[*Throws:] lock_error when the locker do not owns the lockable instance
+
+* `void set(const T& obj, Lockable& owner);`
+
+[*Effect:] reinit the type and lockable references with the given values.
+
+[*Example:]
+See
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/is_strict_locker.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/is_strict_locker.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,25 @@
+[/
+ / 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:is_strict_locker_hpp Header `<boost/synchro/locker/is_strict_locker.hpp>`]
+[/==========================================================================================]
+
+
+[section Metafunction `is_strict_locker`]
+
+ template <typename Locker>
+ struct is_strict_locker {
+ typedef unspecified value;
+ };
+
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/lock_adapter.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lock_adapter.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,95 @@
+[/
+ / 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:poly_lock_adpater_hpp Header `<boost/synchro/poly/lock_adpater.hpp>`]
+[/==========================================================================================]
+
+namespace boost { namespace synchro {
+ namespace poly {
+ template <typename Lockable> class exclusive_lock_adapter;
+ template <typename TimeLockable> class timed_lock_adapter;
+ template <typename ShareLockable> class sharable_lock_adapter;
+ template <typename UpgradaLockable> class upgradable_lock_adapter;
+ }
+}}
+
+
+[section Template Class `exclusive_lock_adapter`]
+
+ template <typename Lockable>
+ class exclusive_lock_adapter
+ : public virtual exclusive_lock
+ {
+ exclusive_lock_adapter();
+ ~exclusive_lock_adapter();
+ void lock();
+ void unlock();
+ bool try_lock();
+ protected:
+ Lockable lock_;
+ };
+
+
+[endsect]
+[section Template Class `timed_lock_adapter`]
+
+ template <typename TimeLockable>
+ class timed_lock_adapter
+ : public exclusive_lock_adapter<TimeLockable>
+ , public virtual timed_lock
+ {
+ public:
+ ~timed_lock_adapter();
+ bool try_lock_until(boost::system_time const& abs_time);
+ template<typename DurationType>
+ bool try_lock_for(DurationType const& rel_time);
+ };
+
+
+[endsect]
+[section Template Class `sharable_lock_adapter`]
+
+ template <typename ShareLockable>
+ class sharable_lock_adapter
+ : public exclusive_lock_adapter<ShareLockable>
+ , public virtual sharable_lock {
+ public:
+ ~sharable_lock_adapter();
+ void lock_shared();
+ bool try_lock_shared();
+ void unlock_shared();
+ };
+
+[endsect]
+[section Template Class `upgradable_lock`]
+
+ template <typename UpgradaLockable>
+ class upgradable_lock_adapter
+ : public sharable_lock_adapter<UpgradaLockable>
+ , public virtual upgradable_lock
+ {
+ public:
+ virtual ~upgradable_lock_adapter();
+ virtual void lock_upgrade();
+
+ virtual void unlock_upgrade();
+
+ virtual void unlock_upgrade_and_lock();
+ virtual void unlock_and_lock_upgrade();
+ virtual void unlock_and_lock_shared();
+ virtual void unlock_upgrade_and_lock_shared();
+ };
+
+
+[endsect]
+
+[endsect]
+
+

Added: sandbox/synchro/libs/synchro/doc/reference/lock_generator.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lock_generator.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,103 @@
+[/
+ (C) Copyright 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:lock_generator_hpp Header `<boost/synchro/lock_generator.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+ template<typename Scope>
+ struct default_lifetime {
+ typedef see_below type;
+ }
+ template<
+ typename Scope=multi_threaded_tag,
+ typename Category=exclusive_lock_tag,
+ typename Reentrancy=non_recursive_tag,
+ typename TimedInterface=has_timed_interface_tag,
+ typename Lifetime=typename default_lifetime<Scope>,
+ typename Naming=anonymous_tag
+ >
+ struct find_best_lock{
+ typedef see_below type;
+ }
+ }}
+
+[section Metafunction `default_lifetime<>`]
+[/==========================================================================================]
+
+Metafunction that returns the default lifetime depending on the Scope.
+
+ template<typename Scope> struct default_lifetime;
+ template<> struct default_lifetime<multi_threaded_tag> {
+ typedef process_lifetime_tag type;
+ };
+ template<> struct default_lifetime<multi_process_tag> {
+ typedef kernel_lifetime_tag type;
+ };
+
+
+[variablelist
+[[Expression:] [default_lifetime<Scope>::type]]
+[[Return type:] [A lifetime tag.]]
+[[Complexity:] [constant.]]
+]
+
+[table default_lifetime relationship
+[
+ [[*`Scope`]] [[*`default_lifetime<Scope>::type`]]
+]
+[
+ [`multi_threaded_tag`] [`process_lifetime_tag`]
+]
+[
+ [`multi_process_tag`] [`kernel_lifetime_tag`]
+]
+]
+
+[endsect]
+
+[section Metafunction `find_best_lock<>`]
+[/==========================================================================================]
+
+ template<
+ typename Scope=multi_threaded_tag,
+ typename Category=exclusive_lock_tag,
+ typename Reentrancy=non_recursive_tag,
+ typename TimedInterface=has_timed_interface_tag,
+ typename Lifetime=typename default_lifetime<Scope>,
+ typename Naming=anonymous_tag
+ >
+ struct find_best_lock{
+ typedef see_below type;
+ }
+
+
+[variablelist
+[[Expression:] [find_best_lock<...>::type]]
+[[Return type:] [A model of `Lockable`.]]
+[[Complexity:] [constant.]]
+]
+
+The library defines already the following matchings:
+
+[table find_best_lock relationship
+ [[[*`Scope`]] [[*`Category`]] [[*`Reentrancy`]] [[*`TimedInterface`]] [[*`Lifetime`]] [[*`Naming`]] [[*`find_best_lock<...>::type`]] ]
+ [[`multi_threaded_tag`] [`exclusive_lock_tag`] [`non_recursive_tag`] [`hasnt_timed_interface_tag`] [`process_lifetime_tag`] [`anonymous_tag`] [`boost::synchro::thread_mutex`] ]
+ [[`multi_threaded_tag`] [`exclusive_lock_tag`] [`recursive_tag`] [`hasnt_timed_interface_tag`] [`process_lifetime_tag`] [`anonymous_tag`] [`boost::synchro::thread_recursive_mutex`] ]
+ [[`multi_threaded_tag`] [`exclusive_lock_tag`] [`non_recursive_tag`] [`has_timed_interface_tag`] [`process_lifetime_tag`] [`anonymous_tag`] [`boost::synchro::thread_timed_mutex`] ]
+ [[`multi_threaded_tag`] [`*`] [`non_recursive_tag`] [`*`] [`process_lifetime_tag`] [`anonymous_tag`] [`boost::synchro::thread_shared_mutex`] ]
+ [[`multi_process_tag`] [`exclusive_lock_tag`] [`non_recursive_tag`] [`*`] [`kernel_lifetime_tag`] [`anonymous_tag`] [`boost::synchro::interprocess_mutex`] ]
+ [[`multi_process_tag`] [`exclusive_lock_tag`] [`recursive_tag`] [`*`] [`kernel_lifetime_tag`] [`anonymous_tag`] [`boost::synchro::interprocess_recursive_mutex`] ]
+ [[`multi_process_tag`] [`*`] [`non_recursive_tag`] [`*`] [`process_lifetime_tag`] [`anonymous_tag`] [`boost::synchro::interprocess_upgradable_mutex`] ]
+]
+
+[endsect]
+[endsect]
+
+
+

Added: sandbox/synchro/libs/synchro/doc/reference/lockable_adapter.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable_adapter.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,89 @@
+[/
+ (C) Copyright 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:lockable_adapter_hpp Header `<boost/synchro/lockable_adapter.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+ template <typename Lockable> class exclusive_lockable_adapter;
+ template <typename TimedLock> class timed_lockable_adapter;
+ template <typename SharableLock> class shared_lockable_adapter;
+ template <typename UpgradableLock> class upgrade_lockable_adapter;
+ template <
+ typename Lockable,
+ typename category,
+ typename timed_interface
+ > struct lockable_adapter;
+ }}
+
+[section Template Class `exclusive_lockable_adapter<>`]
+
+ template <typename Lockable>
+ class exclusive_lockable_adapter : private boost::noncopyable {
+ public:
+ typedef Lockable lockable_type;
+ typedef typename scope_tag<Lockable>::type scope;
+ typedef typename category_tag<Lockable>::type category;
+ typedef typename reentrancy_tag<Lockable>::type reentrancy;
+ typedef typename timed_interface_tag<Lockable>::type timed_interface;
+ typedef typename lifetime_tag<Lockable>::type lifetime;
+ typedef typename naming_tag<Lockable>::type naming;
+
+
+ void lock();
+ void unlock();
+ bool try_lock();
+ };
+
+[endsect]
+[section Template Class `timed_lockable_adapter<>`]
+
+ template <typename TimedLock>
+ class timed_lockable_adapter : public exclusive_lockable_adapter<TimedLock> {
+ public:
+ bool timed_lock(system_time const & abs_time);
+ template<typename TimeDuration>
+ bool timed_lock(TimeDuration const & relative_time);
+ };
+
+[endsect]
+[section Template Class `shared_lockable_adapter<>`]
+
+ template <typename SharableLock>
+ class shared_lockable_adapter : public timed_lockable_adapter<SharableLock> {
+ public:
+ void lock_shared();
+ bool try_lock_shared();
+ void unlock_shared();
+ bool timed_lock_shared(system_time const& t);
+ };
+
+
+[endsect]
+[section Template Class `upgrade_lockable_adapter<>`]
+
+ template <typename UpgradableLock>
+ class upgrade_lockable_adapter : public shared_lockable_adapter<UpgradableLock>{
+ public:
+ void lock_upgrade();
+ void unlock_upgrade();
+
+ void unlock_upgrade_and_lock();
+ void unlock_and_lock_upgrade();
+ void unlock_and_lock_shared();
+ void unlock_upgrade_and_lock_shared();
+ bool timed_lock_upgrade(system_time const&t);
+ };
+
+
+
+[endsect]
+[endsect]
+
+
+

Added: sandbox/synchro/libs/synchro/doc/reference/lockable_concept.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable_concept.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,110 @@
+[/
+ (C) Copyright 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:lockable_concept_hpp Header `<boost/synchro/lockable_concepts.hpp>`]
+[/==========================================================================================]
+
+Lockable concepts.
+
+ template <typename Lockable> struct LockableConcept;
+ template <typename Lockable> struct TimedLockableConcept;
+ template <typename Lockable> struct ShareLockableConcept;
+ template <typename Lockable> struct UpgradeLockableConcept;
+
+
+[section Template Class `LockableConcept<>`]
+
+The boost::mutex and boost:interprocess mutex family classes are a non-polymorphic classes that encapsulates a system primitive and portion of C API. Clearly, many of the synchronisation
+primitives support common operations, and hence a Concept.
+The ExclusiveLockable class can be used with the Boost.ConceptCheck in templates that work with a exclusive synchronisation.
+
+LockableConcept object supports the basic features required to delimit a critical region. Supports the basic lock, unlock and try_lock functions and defines the lock traits
+
+ template <typename Lockable>
+ struct LockableConcept {
+ typedef typename category_tag<Lockable>::type category;
+ typedef typename timed_interface_tag<Lockable>::type timed_interface;
+ typedef typename reentrancy_tag<Lockable>::type reentrancy;
+ typedef typename scope_tag<Lockable>::type scope;
+ typedef typename lifetime_tag<Lockable>::type lifetime;
+ typedef typename naming_tag<Lockable>::type naming;
+
+ BOOST_CONCEPT_USAGE(LockableConcept) {
+ l.lock();
+ l.unlock();
+ l.try_lock();
+ }
+ Lockable l;
+ };
+
+[endsect]
+[section Template Class `TimedLockableConcept<>`]
+
+TimedLockableConcept object extends ExclusiveLockConcept with the timed_lock function
+
+ template <typename Lockable>
+ struct TimedLockableConcept {
+ BOOST_CONCEPT_ASSERT((LockableConcept<Lockable>));
+
+ BOOST_CONCEPT_USAGE(TimedLockableConcept) {
+ l.timed_lock(t);
+ // l.timed_lock(1);
+ }
+ Lockable l;
+ system_time t;
+ };
+
+[endsect]
+[section Template Class `ShareLockableConcept<>`]
+
+ShareLockableConcept object extends ExclusiveTimedLockConcept with the lock_shared, timed_lock_shared, try_lock_shared and unlock_shared functions
+
+ template <typename Lockable>
+ struct ShareLockableConcept {
+ BOOST_CONCEPT_ASSERT((TimedLockableConcept<Lockable>));
+
+ BOOST_CONCEPT_USAGE(ShareLockableConcept) {
+ l.lock_shared();
+ l.timed_lock_shared(t);
+ l.try_lock_shared();
+ l.unlock_shared();
+ }
+ Lockable l;
+ system_time t;
+ };
+
+
+[endsect]
+[section Template Class `UpgradeLockableConcept<>`]
+
+UpgradeLockableConcept object extends SharableLockableConcept with the lock_upgrade, timed_lock_upgrade, unlock_upgrade_and_lock, unlock_and_lock_shared and unlock_upgrade_and_lock_shared functions.
+
+
+ template <typename Lockable>
+ struct UpgradeLockableConcept {
+ BOOST_CONCEPT_ASSERT((ShareLockableConcept<Lockable>));
+
+ BOOST_CONCEPT_USAGE(UpgradeLockableConcept) {
+ l.lock_upgrade();
+ l.timed_lock_upgrade(t);
+ l.unlock_upgrade_and_lock();
+ l.unlock_and_lock_upgrade();
+ l.unlock_and_lock_shared();
+ l.unlock_upgrade_and_lock_shared();
+ }
+ Lockable l;
+ system_time t;
+ };
+
+
+
+[endsect]
+[endsect]
+
+
+

Added: sandbox/synchro/libs/synchro/doc/reference/lockable_traits.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/lockable_traits.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,212 @@
+[/
+ / 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:lockable_traits_hpp Header `<boost/synchro/lockable_traits.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+
+ struct mono_threaded_tag;
+ struct multi_threaded_tag;
+ struct multi_process_tag;
+ template <typename Lockable> struct scope_tag;
+
+ template <typename Lockable> struct is_mono_threaded;
+ template <typename Lockable> struct is_multi_threaded;
+ template <typename Lockable> struct is_multi_process;
+
+ struct process_lifetime_tag;
+ struct kernel_lifetime_tag;
+ struct filesystem_lifetime_tag;
+ template <typename Lockable> struct lifetime_tag;
+
+ struct anonymous_tag;
+ struct named_tag;
+ template <typename Lockable> struct naming_tag;
+
+ struct exclusive_lock_tag;
+ struct sharable_lock_tag;
+ struct upgradable_lock_tag;
+ template <typename Lockable> struct category_tag;
+
+ template <typename Lockable> struct is_exclusive_lock;
+ template <typename Lockable> struct is_sharable_lock;
+ template <typename Lockable> struct is_upgradable_lock;
+
+ struct non_recursive_tag;
+ struct recursive_tag;
+ template <typename Lockable> struct reentrancy_tag;
+
+ template <typename Lockable> struct is_recursive_lock;
+
+ struct hasnt_timed_interface_tag;
+ struct has_timed_interface_tag;
+ template <typename Lockable> struct timed_interface_tag;
+
+ template <typename Lockable> struct has_timed_interface;
+
+ template <typename Locker> struct lockable_type;
+
+ template <typename Lockable> struct best_condition;
+
+ template <typename Lockable> struct best_condition_any;
+
+ template <typename Lockable> struct scoped_lock_type;
+ template <typename Lockable> struct unique_lock_type;
+ template <typename Lockable> struct shared_lock_type;
+ template <typename Lockable> struct upgrade_lock_type;
+
+ template <typename Lockable> struct lock_error_type;
+
+ template <typename Lockable> struct move_object_type;
+
+ template <typename Lockable> struct defer_lock_type;
+ template <typename Lockable> struct adopt_lock_type;
+ template <typename Lockable> struct try_to_lock_type;
+
+ template<typename Scope> struct default_lifetime;
+
+ template<
+ typename Scope=multi_threaded_tag,
+ typename Cathegory=exclusive_lock_tag,
+ typename Reentrancy=non_recursive_tag,
+ typename TimedInterface=has_timed_interface_tag,
+ typename Lifetime=typename default_lifetime<Scope>,
+ typename Naming=anonymous_tag,
+ typename Base=void
+ > struct lock_traits_base;
+
+ }}
+
+[section Template Class `has_timed_interface`]
+
+ template <typename Lockable>
+ struct has_timed_interface
+ : is_same_or_is_base_and_derived<
+ has_timed_interface_tag,
+ typename timed_interface_tag<Lockable>::type
+ >
+ {};
+
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `is_exclusive`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `is_shared`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `is_recursive`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `is_mono_threaded`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `is_multi_threaded`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `is_multi_process`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `mutex_type`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `scoped_lock`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `unique_lock`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `shared_lock`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `upgrade_lock`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `lock_error`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `moved_object`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `lock_error2`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `lock_error3`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+[section Class `lock_error4`]
+[*Synopsis]
+[*Description]
+
+[endsect]
+
+[section Class `lock_traits`]
+
+[*Synopsis]
+
+ template<typename Lockable>
+ struct lock_traits;
+ typedef Lockable mutex_type;
+ typedef unspecified scoped_lock;
+ typedef unspecified unique_lock;
+ typedef unspecified shared_lock;
+ typedef unspecified upgrade_lock;
+ typedef unspecified lock_error;
+ typedef unspecified moved_object;
+ static const unspecified defer_lock();
+ static const unspecified adopt_lock();
+ static const unspecified try_to_lock();
+ };
+
+
+[*Description]
+Lock Traits characterise lockable types.
+
+[*`nested_strict_locker` public member types]
+
+# `;`
+
+[endsect]
+
+[endsect]
+

Added: sandbox/synchro/libs/synchro/doc/reference/locker_concepts.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/locker_concepts.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,76 @@
+[/
+ (C) Copyright 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:locker_concepts_hpp Header `<boost/synchro/locker_concepts.hpp>`]
+[/==========================================================================================]
+
+Locker concepts.
+
+ namespace boost { namespace synchro {
+
+ template <typename Locker>
+ struct LockerConcept {
+ typedef typename lockable_type<Locker>::type lockable_type;
+ BOOST_CONCEPT_USAGE(LockerConcept) {
+ Locker l(mtx_);
+ }
+ lockable_type mtx_;
+ };
+
+ template <typename Locker>
+ struct MovableLockerConcept {
+ typedef typename lockable_type<Locker>::type lockable_type;
+ BOOST_CONCEPT_ASSERT((LockerConcept<lockable_type>));
+
+ BOOST_CONCEPT_USAGE(MovableLockerConcept) {
+ Locker l1(mtx_);
+ Locker& l2(l1);
+ Locker l3(l1.move());
+ BOOST_ASSERT((l2.mutex()!=&mtx_));
+ l3.lock();
+ l2 = l3.move();
+ }
+ lockable_type mtx_;
+ };
+ }}
+
+[section Template Class `LockerConcept<>`]
+
+ template <typename Locker>
+ struct LockerConcept {
+ typedef typename lockable_type<Locker>::type lockable_type;
+ BOOST_CONCEPT_USAGE(LockerConcept) {
+ Locker l(mtx_);
+ }
+ lockable_type mtx_;
+ };
+
+[endsect]
+[section Template Class `MovableLockerConcept<>`]
+
+ template <typename Locker>
+ struct MovableLockerConcept {
+ typedef typename lockable_type<Locker>::type lockable_type;
+ BOOST_CONCEPT_ASSERT((LockerConcept<lockable_type>));
+
+ BOOST_CONCEPT_USAGE(MovableLockerConcept) {
+ Locker l1(mtx_);
+ Locker& l2(l1);
+ Locker l3(l1.move());
+ BOOST_ASSERT((l2.mutex()!=&mtx_));
+ l3.lock();
+ l2 = l3.move();
+ }
+ lockable_type mtx_;
+ };
+
+[endsect]
+[endsect]
+
+
+

Added: sandbox/synchro/libs/synchro/doc/reference/locking_ptr.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/locking_ptr.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,106 @@
+[/
+ / 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:locking_ptr_hpp Header `<boost/synchro/locker/locking_ptr.hpp>`]
+[/==========================================================================================]
+
+[section Class `locking_ptr`]
+
+[*Synopsis]
+
+ template <typename T, typename Lockable>
+ class locking_ptr : private boost::noncopyable {
+ public:
+ typedef T value_type;
+ typedef Lockable mutex_type;
+
+ locking_ptr(volatile value_type& obj, mutex_type& mtx);
+ ~locking_ptr();
+
+ value_type& operator*();
+ const value_type& operator*() const;
+ value_type* operator->();
+ const value_type* operator->() const;
+ };
+
+[*Description]
+
+The `locking_ptr` overloads `operator->` to return a temporary object that will
+perform the locking. This too provides an `operator->`. Calls to `operator->`
+are automatically chained by the compiler until a raw pointer type is returned. In
+pointer's `operator->` the lock is applied and in its destructor, called at the
+end of a full expression, it is released.
+
+[warning Programmers should be careful about attempting to access the same object twice in
+a statement using `locking_ptr`: this will cause deadlock if the synchronisation
+strategy is not re-entrant.]
+
+[*Example Code]
+
+
+[*`locking_ptr` constructors:destructors]
+# `locking_ptr(volatile value_type& obj, mutex_type& mtx);`
+# `~locking_ptr();`
+
+[*`locking_ptr` public member functions]
+
+# `value_type& operator*();`
+# `const value_type& operator*() const;`
+# `value_type* operator->();`
+# `const value_type* operator->() const;`
+
+[endsect]
+
+[section Class `sharable_locking_ptr`]
+[*Synopsis]
+
+ template <typename T, typename SharableLockable>
+ class sharable_locking_ptr
+ : private boost::noncopyable {
+ public:
+ typedef T value_type;
+ typedef SharableLockable mutex_type;
+
+ sharable_locking_ptr(volatile value_type& obj, mutex_type& mtx);
+ ~sharable_locking_ptr();
+
+ value_type& operator*();
+ const value_type& operator*() const;
+ value_type* operator->();
+ const value_type* operator->() const;
+ };
+
+ template <typename T, typename SharableLockable>
+ class sharable_locking_ptr<const T, SharableLockable>
+ : private boost::noncopyable {
+ public:
+ typedef T value_type;
+ typedef SharableLockable mutex_type;
+
+ sharable_locking_ptr(
+ volatile const value_type& obj,
+ mutex_type& mtx);
+ ~sharable_locking_ptr();
+
+ value_type& operator*();
+ const value_type& operator*() const;
+ value_type* operator->();
+ const value_type* operator->() const;
+ };
+
+[*Description]
+
+[*`nested_strict_locker` public member functions]
+
+# `;`
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/monitor.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/monitor.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,112 @@
+[/
+ (C) Copyright 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:monitor_hpp Header `<boost/synchro/monitor.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+ template <
+ typename Lockable,
+ class Condition,
+ class ConditionBoosted
+ >
+ class exclusive_monitor;
+ }}
+
+
+[section Template Class `exclusive_lockable_adapter<>`]
+
+The boost::mutex and boost:interprocess mutex family classes are a non-polymorphic classes that encapsulates a system primitive and portion of C API. Clearly, many of the synchronisation
+primitives support common operations, and hence a Concept.
+The ExclusiveLockable class can be used with the Boost.ConceptCheck in templates that work with a exclusive synchronisation.
+
+LockableConcept object supports the basic features required to delimit a critical region. Supports the basic lock, unlock and try_lock functions and defines the lock traits
+
+ template <typename Lockable>
+ struct LockableConcept {
+ typedef typename category_tag<Lockable>::type category;
+ typedef typename timed_interface_tag<Lockable>::type timed_interface;
+ typedef typename reentrancy_tag<Lockable>::type reentrancy;
+ typedef typename scope_tag<Lockable>::type scope;
+ typedef typename lifetime_tag<Lockable>::type lifetime;
+ typedef typename naming_tag<Lockable>::type naming;
+
+ BOOST_CONCEPT_USAGE(LockableConcept) {
+ l.lock();
+ l.unlock();
+ l.try_lock();
+ }
+ Lockable l;
+ };
+
+[endsect]
+[section Template Class `timed_lockable_adapter<>`]
+
+TimedLockableConcept object extends ExclusiveLockConcept with the timed_lock function
+
+ template <typename Lockable>
+ struct TimedLockableConcept {
+ BOOST_CONCEPT_ASSERT((LockableConcept<Lockable>));
+
+ BOOST_CONCEPT_USAGE(TimedLockableConcept) {
+ l.timed_lock(t);
+ // l.timed_lock(1);
+ }
+ Lockable l;
+ system_time t;
+ };
+
+[endsect]
+[section Template Class `shared_lockable_adapter<>`]
+
+ShareLockableConcept object extends ExclusiveTimedLockConcept with the lock_shared, timed_lock_shared, try_lock_shared and unlock_shared functions
+
+ template <typename Lockable>
+ struct ShareLockableConcept {
+ BOOST_CONCEPT_ASSERT((TimedLockableConcept<Lockable>));
+
+ BOOST_CONCEPT_USAGE(ShareLockableConcept) {
+ l.lock_shared();
+ l.timed_lock_shared(t);
+ l.try_lock_shared();
+ l.unlock_shared();
+ }
+ Lockable l;
+ system_time t;
+ };
+
+
+[endsect]
+[section Template Class `upgrade_lockable_adapter<>`]
+
+UpgradeLockableConcept object extends SharableLockableConcept with the lock_upgrade, timed_lock_upgrade, unlock_upgrade_and_lock, unlock_and_lock_shared and unlock_upgrade_and_lock_shared functions.
+
+
+ template <typename Lockable>
+ struct UpgradeLockableConcept {
+ BOOST_CONCEPT_ASSERT((ShareLockableConcept<Lockable>));
+
+ BOOST_CONCEPT_USAGE(UpgradeLockableConcept) {
+ l.lock_upgrade();
+ l.timed_lock_upgrade(t);
+ l.unlock_upgrade_and_lock();
+ l.unlock_and_lock_upgrade();
+ l.unlock_and_lock_shared();
+ l.unlock_upgrade_and_lock_shared();
+ }
+ Lockable l;
+ system_time t;
+ };
+
+
+
+[endsect]
+[endsect]
+
+
+

Added: sandbox/synchro/libs/synchro/doc/reference/nested_reverse_locker.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/nested_reverse_locker.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,33 @@
+[/
+ / Copyright (c) 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:nested_reverse_locker_hpp Header `<boost/synchro/locker/nested_reverse_locker.hpp>`]
+[/==========================================================================================]
+
+ template <typename Locker>
+ class nested_reverse_locker;
+
+[section Class `nested_reverse_locker`]
+This is an interesting adapter class that changes a locker into a reverse locker, i.e., `unlock` on construction and `lock` on destruction. One motivation for this class is when we temporarily want to unlock a lock (locked by another locker) but then re-lock it soon after.
+
+[*Synopsis]
+
+template <typename Locker>
+class nested_reverse_locker : boost::noncopyable
+{
+ BOOST_CONCEPT_ASSERT((MovableLockerConcept<Locker>));
+public:
+ explicit nested_reverse_locker(Locker& locker);
+ ~nested_reverse_locker();
+};
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/null_condition.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/null_condition.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,47 @@
+[/
+ / 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:null_condition_hpp Header `<boost/synchro/null_condition.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+
+ class null_condition {
+ private:
+ null_condition(const null_condition &);
+ null_condition &operator=(const null_condition &);
+ public:
+ null_condition();
+ ~null_condition();
+
+ void notify_one();
+
+ void notify_all();
+
+ template <typename L>
+ void wait(L& lock);
+
+ template <typename L, typename Pr>
+ void wait(L& lock, Pr pred);
+
+ template <typename L>
+ bool timed_wait(L& lock, const boost::posix_time::ptime &abs_time);
+
+ template <typename L, typename Pr>
+ bool timed_wait(L& lock, const boost::posix_time::ptime &abs_time, Pr pred);
+
+ };
+ template <>
+ struct best_condition<null_mutex> {
+ typedef null_condition type;
+ };
+ }}
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/null_mutex.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/null_mutex.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,77 @@
+[/
+ / 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:null_mutex_hpp Header `<boost/synchro/null_mutex.hpp>`]
+[/==========================================================================================]
+
+namespace boost { namespace synchro {
+class null_condition;
+class null_mutex : public lock_traits_base<
+ mono_threaded_tag,
+ upgradable_lock_tag,
+ recursive_tag,
+ has_timed_interface_tag,
+ kernel_lifetime_tag,
+ anonymous_tag,
+ void
+>
+{
+ null_mutex(const null_mutex&);
+ null_mutex &operator= (const null_mutex&);
+public:
+ typedef null_condition condition_type;
+ typedef null_condition condition_any_type;
+
+ null_mutex();
+ ~null_mutex();
+
+ void lock();
+ bool try_lock();
+ bool try_lock_until(const boost::posix_time::ptime &);
+ template<typename TimeDuration>
+ bool try_lock_for(TimeDuration const & relative_time);
+
+ void unlock();
+
+ void lock_shared(){};
+ bool try_lock_shared();
+ bool try_lock_shared_until(const boost::posix_time::ptime &);
+ template<typename DurationType>
+ bool try_lock_shared_for(DurationType const& rel_time)
+
+ void unlock_shared();
+
+ void lock_upgrade();
+ bool try_lock_upgrade();
+ bool timed_lock_upgrade(boost::posix_time::ptime const &);
+
+ void unlock_upgrade();
+
+ void unlock_and_lock_upgrade();
+
+ void unlock_and_lock_shared();
+
+ void unlock_upgrade_and_lock_shared();
+
+ void unlock_upgrade_and_lock();
+
+ bool try_unlock_upgrade_and_lock();
+
+ bool timed_unlock_upgrade_and_lock(const boost::posix_time::ptime &);
+
+ bool try_unlock_share_and_lock();
+
+ bool try_unlock_share_and_lock_upgrade();
+};
+
+}}
+
+[endsect]
+

Added: sandbox/synchro/libs/synchro/doc/reference/null_synchronization_family.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/null_synchronization_family.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,38 @@
+[/
+ / 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:null_synchronization_family_hpp Header `<boost/synchro/null_synchronization_family.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+ struct null_synchronization_family;
+ }}
+
+[section Class `null_synchronization_policy`]
+
+[*Synopsis]
+
+
+ struct null_synchronization_family
+ {
+ typedef boost::synchro::null_mutex mutex_type;
+ typedef boost::synchro::null_mutex recursive_mutex_type;
+ typedef boost::synchro::null_mutex timed_mutex_type;
+ typedef boost::synchro::null_mutex recursive_timed_mutex_type;
+ typedef boost::synchro::null_mutex shared_mutex_type;
+ typedef boost::synchro::null_condition condition_type;
+ typedef boost::synchro::null_condition condition_any_type;
+ };
+
+
+
+[endsect]
+[endsect]
+

Added: sandbox/synchro/libs/synchro/doc/reference/on_derreference_locking_ptr.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/on_derreference_locking_ptr.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,41 @@
+[/
+ / 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:on_derreference_locking_ptr_hpp Header `<boost/synchro/locker/on_derreference_locking_ptr.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+ template<typename T, typename Lockable>
+ class on_derreference_locking_ptr;
+ }}
+
+[section Class `on_derreference_locking_ptr`]
+[*Synopsis]
+
+ template<typename T, typename Lockable>
+ class on_derreference_locking_ptr {
+ public:
+ class pointer {
+ public:
+ explicit pointer(T* target, Lockable* mutex);
+ ~pointer();
+ T *operator->();
+ };
+
+ explicit on_derreference_locking_ptr(T &target, Lockable& mutex);
+ pointer operator->() const;
+ };
+
+[*Description]
+
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/poly_lock.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/poly_lock.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,92 @@
+[/
+ / 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:poly_lock_hpp Header `<boost/synchro/poly/lock.hpp>`]
+[/==========================================================================================]
+
+namespace boost { namespace synchro {
+ namespace poly {
+ struct exclusive_lock;
+ struct timed_lock;
+ struct sharable_lock;
+ struct upgradable_lock;
+ }
+}}
+
+[section Abstract Class `exclusive_lock`]
+
+Polymorphic exclusive lock interface.
+
+ struct exclusive_lock {
+ virtual ~exclusive_lock()=0;
+ virtual void lock()=0;
+ virtual void unlock()=0;
+ virtual bool try_lock()=0;
+ };
+
+
+[endsect]
+[section Abstract Class `timed_lock`]
+
+Polymorphic timed lock interface.
+
+ struct timed_lock : exclusive_lock {
+ virtual ~timed_lock()=0;
+ bool try_lock_until(boost::system_time const& abs_time)=0;
+ template<typename DurationType>
+ bool try_lock_for(DurationType const& rel_time)
+ {
+ return try_lock_until(get_system_time()+abs_time);
+ }
+ };
+
+
+[endsect]
+[section Abstract Class `sharable_lock`]
+
+Polymorphic sharable lock interface.
+
+ struct sharable_lock : timed_lock {
+ virtual ~sharable_lock();
+ virtual void lock_shared()=0;
+ virtual bool try_lock_shared()=0;
+ virtual bool try_lock_shared_until(boost::system_time const& abs_time)=0;
+ virtual void unlock_shared()=0;
+ template<typename DurationType>
+ bool try_lock_shared_for(DurationType const& rel_time)
+ {
+ return try_lock_shared_until(get_system_time()+abs_time);
+ }
+ };
+
+
+
+[endsect]
+[section Abstract Class `upgradable_lock`]
+
+Polymorphic upgradable lock interface.
+
+ struct upgradable_lock : sharable_lock {
+ virtual ~upgradable_lock();
+ virtual void lock_upgrade()=0;
+ virtual void unlock_upgrade()=0;
+ virtual void unlock_upgrade_and_lock()=0;
+ virtual void unlock_and_lock_upgrade()=0;
+ virtual void unlock_and_lock_shared()=0;
+ virtual void unlock_upgrade_and_lock_shared()=0;
+ };
+
+
+
+[endsect]
+
+[endsect]
+
+

Added: sandbox/synchro/libs/synchro/doc/reference/process_synchronization_family.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/process_synchronization_family.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,35 @@
+[/
+ / 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:process_synchronization_family_hpp Header `<boost/synchro/process_synchronization_family.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+ struct process_synchronization_family;
+ }}
+
+[section Class `process_synchronization_family`]
+
+[*Synopsis]
+
+ struct process_synchronization_family {
+ typedef boost::synchro::interprocess_mutex mutex_type;
+ typedef boost::synchro::interprocess_recursive_mutex recursive_mutex_type;
+ typedef boost::synchro::interprocess_mutex timed_mutex_type;
+ typedef boost::synchro::interprocess_recursive_mutex recursive_timed_mutex_type;
+ typedef boost::synchro::interprocess_upgradable_mutex shared_mutex_type;
+ typedef boost::interprocess::interprocess_condition condition_type;
+ typedef boost::interprocess::interprocess_condition condition_any_type;
+ };
+
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/reverse_locker.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/reverse_locker.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,34 @@
+[/
+ / 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:reverse_locker_hpp Header `<boost/synchro/locker/reverse_locker.hpp>`]
+[/==========================================================================================]
+
+ template <typename Lockable>
+ class reverse_locker;
+
+[section Class `reverse_lock`]
+This is an interesting adapter class that changes a Lockable into a reverse lockable, i.e.,`lock` on this class calls `unlock` on the lockable, and `unlock` on this class calls `lock` on the lock. One motivation for this class is when we temporarily want to unlock a lock (which we have already locked) but then re-lock it soon after.
+
+[*Synopsis]
+
+ template <typename Lockable>
+ class reverse_locker
+ {
+ reverse_locker(Lockable& mtx);
+ ~reverse_locker();
+
+ protected:
+ Lockable& mtx_;
+ };
+
+[endsect]
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/semaphore.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/semaphore.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,36 @@
+[/
+ / 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:semaphore_hpp Header `<boost/synchro/semaphore.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace synchro {
+
+ template <typename Sync=thread_synchronization_family>
+ class basic_semaphore {
+ basic_semaphore(const basic_semaphore &);
+ this_type& operator=(const basic_semaphore &);
+ public:
+ basic_semaphore(int initialCount);
+ ~basic_semaphore();
+ void post();
+ void wait();
+ bool try_wait();
+ bool wait_until(const system_time &abs_time);
+ template<typename TimeDuration>
+ bool wait_for(const TimeDuration &rel_time);
+ };
+
+ typedef basic_semaphore<> semaphore;
+
+ }}
+
+[endsect]
+

Added: sandbox/synchro/libs/synchro/doc/reference/strict_locker.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/strict_locker.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,162 @@
+[/
+ / 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:strict_locker_hpp Header `<boost/synchro/locker/strict_locker.hpp>`]
+[/==========================================================================================]
+
+[section Class `strict_locker`]
+[*Synopsis]
+
+namespace boost { namespace synchro {
+
+ template <typename Locker>
+ struct StrictLockerConcept {
+ typedef typename lockable_type<Locker>::type lockable_type;
+ BOOST_STATIC_ASSERT((is_strict_locker<Locker>::value));
+
+ void f(Locker& l ) {
+ BOOST_ASSERT((l.is_locking(lock)));
+ }
+
+ BOOST_CONCEPT_USAGE(StrictLockerConcept) {
+ {
+ // Locker l(lock);
+ // BOOST_ASSERT((l));
+ }
+ }
+ lockable_type lock;
+ };
+
+ template <typename Lockable>
+ class strict_locker {
+ public:
+ typedef Lockable lockable_type;
+ typedef unspecified bool_type;
+
+ explicit strict_locker(lockable_type& obj);
+ ~strict_locker();
+
+ operator bool_type() const;
+ bool operator!() const;
+ bool owns_lock() const;
+ lockable_type* mutex() const;
+
+ BOOST_ADRESS_OF_DELETE(strict_locker)
+ BOOST_HEAP_ALLOCATION_DELETE()
+ BOOST_DEFAULT_CONSTRUCTOR_DELETE(strict_locker) /*< disable default construction >*/
+ BOOST_COPY_CONSTRUCTOR_DELETE(strict_locker) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(strict_locker) /*< disable copy asignement >*/
+ };
+
+ template <typename Lockable>
+ struct is_strict_locker<strict_locker<Lockable> > : mpl::true_ {};
+
+ template <typename Locker > class nested_strict_locker {
+ BOOST_CONCEPT_ASSERT((MovableLockerConcept<Locker>));
+ public:
+ typedef typename lockable_type<Locker>::type lockable_type;
+ typedef typename syntactic_lock_traits<lockable_type>::lock_error lock_error;
+
+ nested_strict_locker(Locker& locker);
+ ~nested_strict_locker();
+ typedef bool (nested_strict_locker::*bool_type)() const;
+ operator bool_type() const;
+ bool operator!() const;
+ bool owns_lock() const;
+ const lockable_type* mutex() const;
+ bool is_locking(lockable_type* l) const;
+
+ BOOST_ADRESS_OF_DELETE(nested_strict_locker)
+ BOOST_HEAP_ALLOCATEION_DELETE(nested_strict_locker)
+ BOOST_DEFAULT_CONSTRUCTOR_DELETE(strict_locker) /*< disable default construction >*/
+ BOOST_COPY_CONSTRUCTOR_DELETE(strict_locker) /*< disable copy construction >*/
+ BOOST_COPY_ASSIGNEMENT_DELETE(strict_locker) /*< disable copy asignement >*/
+ };
+
+ template <typename Locker>
+ struct is_strict_locker<nested_strict_locker<Locker> > : mpl::true_ {} ;
+
+}}
+
+[*Description]
+
+[Note strict_locker is not a model of Lockable concept.]
+
+[*`strict_locker` template parameters]
+
+* `Lockable` : The exclusive lockable type used to synchronize exclusive access
+
+[*`strict_locker` public types]
+
+* `lockable_type` : The exclusive lockable type used to synchronize exclusive access
+* `lock_error` : The exception type throw incase of errors
+* `bool_type` : The bool_type of the safe_bool idiom
+
+[*`nested_strict_locker` public member functions]
+
+* `explicit strict_locker(lockable_type& obj);`
+* `~strict_locker();`
+* `operator bool_type() const;`
+* `bool operator!() const;`
+* `operator bool_type() const;`
+* `lockable_type* mutex() const;`
+* `lockable_type* get_lockable() const;`
+
+[*`nested_strict_locker` private and not defined member functions]
+
+* `strict_locker()`
+* `strict_locker(strict_locker&);`
+* `operator=(strict_locker&);`
+* `operator&();`
+* `void* operator new(std::size_t)`
+* `void* operator new[](std::size_t)`
+* `void operator delete(void*)`
+* `void operator delete[](void*)`
+
+[endsect]
+[section Class `nested_strict_locker`]
+[*Synopsis]
+
+ template <typename Locker>
+ class nested_strict_locker : private boost::noncopyable {
+ public:
+ typedef typename locker_traits<Locker>::bad_lock bad_lock;
+
+ nested_strict_locker(Locker& lock);
+ ~nested_strict_locker();
+
+ typedef unspecified bool_type;
+ operator bool_type() const;
+
+ bool operator!() const
+ bool owns_lock() const
+ Mutex* mutex() const
+ private:
+ strict_locker();
+ BOOST_NON_ALIAS(strict_locker);
+ BOOST_NON_HEAP_ALLOCATED();
+ };
+
+[*Description]
+
+
+[endsect]
+
+[section Template Class `nested_strict_locker`]
+A reverse (or anti) locker.
+
+[*Synopsis]
+
+[*Description]
+
+[endsect]
+
+
+[endsect]

Added: sandbox/synchro/libs/synchro/doc/reference/thread_synchronization_family.qbk
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/reference/thread_synchronization_family.qbk 2009-02-14 07:56:20 EST (Sat, 14 Feb 2009)
@@ -0,0 +1,31 @@
+[/
+ / 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:thread_synchronization_family_hpp Header `<boost/synchro/thread_synchronization_family.hpp>`]
+[/==========================================================================================]
+
+[section Class `thread_synchronization_family`]
+
+[*Synopsis]
+
+ struct thread_synchronization_family
+ {
+ typedef boost::mutex mutex_type;
+ typedef boost::recursive_mutex recursive_mutex_type;
+ typedef boost::timed_mutex timed_mutex_type;
+ typedef boost::recursive_timed_mutex recursive_timed_mutex_type;
+ typedef boost::shared_mutex shared_mutex_type;
+ typedef boost::condition_variable_any condition_variable_type;
+ };
+
+
+[endsect]
+
+[endsect]


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