|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60284 - in sandbox/stm/branches/vbe/libs/stm/doc: . html html/toward_boost_stm html/toward_boost_stm/appendices html/toward_boost_stm/overview html/toward_boost_stm/reference html/toward_boost_stm/users_guide reference reference/sync reference/tx
From: vicente.botet_at_[hidden]
Date: 2010-03-07 05:26:05
Author: viboes
Date: 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
New Revision: 60284
URL: http://svn.boost.org/trac/boost/changeset/60284
Log:
Boost.STM/vbe:
* Update doc
Added:
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/built_in_transactional_objects.html (contents, props changed)
sandbox/stm/branches/vbe/libs/stm/doc/reference/deep_transaction_object.qbk (contents, props changed)
sandbox/stm/branches/vbe/libs/stm/doc/reference/sync/
sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/object.qbk (contents, props changed)
sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/proxy_cache.qbk (contents, props changed)
Text files modified:
sandbox/stm/branches/vbe/libs/stm/doc/getting_started.qbk | 15
sandbox/stm/branches/vbe/libs/stm/doc/html/index.html | 12
sandbox/stm/branches/vbe/libs/stm/doc/html/standalone_HTML.manifest | 5
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/changes.html | 4
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/implementation.html | 10
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/rationale.html | 66 +-
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/todo.html | 32
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/overview.html | 26
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/overview/intro.html | 81 +-
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference.html | 42
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/contention_managers.html | 6
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/core.html | 8
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/transactional_objects.html | 1175 ++++++++++++---------------------------
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/ext_references.html | 4
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/getting_started.html | 49
sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/tutorial.html | 92 +-
sandbox/stm/branches/vbe/libs/stm/doc/installation.qbk | 10
sandbox/stm/branches/vbe/libs/stm/doc/introduction.qbk | 32
sandbox/stm/branches/vbe/libs/stm/doc/overview.qbk | 16
sandbox/stm/branches/vbe/libs/stm/doc/reference.qbk | 35
sandbox/stm/branches/vbe/libs/stm/doc/reference/shallow_transaction_object.qbk | 74 +
sandbox/stm/branches/vbe/libs/stm/doc/reference/transaction_object.qbk | 87 +-
sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/numeric.qbk | 22
sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/pointer.qbk | 37
sandbox/stm/branches/vbe/libs/stm/doc/tutorial.qbk | 65 +
25 files changed, 818 insertions(+), 1187 deletions(-)
Modified: sandbox/stm/branches/vbe/libs/stm/doc/getting_started.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/getting_started.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/getting_started.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -20,19 +20,16 @@
The below example gives a basic introduction into __Boost_STM_s__ transactional framework and demonstrates __Boost_STM_s__ ACI conformance.
-
- tx_obj<int> counter;
+ #include <boost/stm.hpp>
+ Boost::stm::tx::object<int> counter(0);
int increment() {
- int val = 0;
- use_atomic(_) {
- (*counter)++;
- val = *counter;
- }
- return val;
+ BOOST_STM_TRANSACTION {
+ return counter++;
+ } BOOST_STM_TRANSACTION;
}
-In the above example, (A) both the write on counter and the read operations function atomically or neither operations are performed. In addition, (C) the transaction begins and ends in legal memory states, meaning global int is guaranteed to be read correctly, preventing thread data races from causing inconsistent results. Lastly, (I) the intermediate state of the incremented global int is isolated until the transaction commits. These three attributes fulfill __Boost_STM_s__ conformance to the ACI principles. The above example also gives a basic introduction into __Boost_STM_s__ transactional framework.
+In the above example, (A) both the write on `counter` and the read operations function atomically or neither operations are performed. In addition, (C) the transaction begins and ends in legal memory states, meaning `counter` is guaranteed to be read correctly, preventing thread data races from causing inconsistent results. Lastly, (I) the intermediate state of the incremented `counter` is isolated until the transaction commits. These three attributes fulfill __Boost_STM_s__ conformance to the ACI principles. The above example also gives a basic introduction into __Boost_STM_s__ transactional framework.
[endsect]
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/index.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/index.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/index.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -31,7 +31,7 @@
<div><p class="copyright">Copyright © 2009 Justin E. Gottchlich</p></div>
<div><p class="copyright">Copyright © 2009 Vicente J. Botet Escriba</p></div>
<div><div class="legalnotice">
-<a name="id4803237"></a><p>
+<a name="id4803238"></a><p>
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)
</p>
@@ -54,11 +54,9 @@
<dd><dl>
<dt><span class="section"> Header <boost/stm.hpp>
</span></dt>
<dt><span class="section">Core</span></dt>
-<dt><span class="section"><a href="toward_boost_stm/reference/mixins_transactional_objects.html">Mixins
- Transactional Objects</a></span></dt>
-<dt><span class="section"><a href="toward_boost_stm/reference/warppers_transactional_objects.html">Warppers
- Transactional Objects</a></span></dt>
-<dt><span class="section"><a href="toward_boost_stm/reference/non_transactional_objects.html">Non
+<dt><span class="section"><a href="toward_boost_stm/reference/transactional_objects.html">Transactional
+ Objects</a></span></dt>
+<dt><span class="section"><a href="toward_boost_stm/reference/built_in_transactional_objects.html">Built-in
Transactional Objects</a></span></dt>
<dt><span class="section"><a href="toward_boost_stm/reference/contention_managers.html">Contention
Managers</a></span></dt>
@@ -98,7 +96,7 @@
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: October 24, 2009 at 19:31:01 GMT</small></p></td>
+<td align="left"><p><small>Last revised: March 07, 2010 at 09:47:10 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/standalone_HTML.manifest
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/standalone_HTML.manifest (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/standalone_HTML.manifest 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -9,9 +9,8 @@
toward_boost_stm/reference.html
toward_boost_stm/reference/stm_hpp.html
toward_boost_stm/reference/core.html
-toward_boost_stm/reference/mixins_transactional_objects.html
-toward_boost_stm/reference/warppers_transactional_objects.html
-toward_boost_stm/reference/non_transactional_objects.html
+toward_boost_stm/reference/transactional_objects.html
+toward_boost_stm/reference/built_in_transactional_objects.html
toward_boost_stm/reference/contention_managers.html
toward_boost_stm/examples.html
toward_boost_stm/appendices.html
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/changes.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/changes.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/changes.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -27,7 +27,7 @@
<a name="toward_boost_stm.appendices.changes"></a> Appendix A: History
</h3></div></div></div>
<a name="toward_boost_stm.appendices.changes._emphasis_role__bold__version_0_1__xx_yy__2009__emphasis___emphasis_announcement_of_stm__emphasis_"></a><h4>
-<a name="id4865133"></a>
+<a name="id4859036"></a>
<a href="changes.html#toward_boost_stm.appendices.changes._emphasis_role__bold__version_0_1__xx_yy__2009__emphasis___emphasis_announcement_of_stm__emphasis_"><span class="bold"><strong>Version 0.1, XX YY, 2009</strong></span> <span class="emphasis"><em>Announcement of
STM</em></span></a>
</h4>
@@ -47,7 +47,7 @@
</li>
</ul></div>
<a name="toward_boost_stm.appendices.changes._emphasis_role__bold__tickets___emphasis_"></a><h4>
-<a name="id4865206"></a>
+<a name="id4859109"></a>
<a href="changes.html#toward_boost_stm.appendices.changes._emphasis_role__bold__tickets___emphasis_"><span class="bold"><strong>Tickets:</strong></span></a>
</h4>
<p>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/implementation.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/implementation.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/implementation.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -56,7 +56,7 @@
constructs are shown in Figures 6 and 8, respectively.
</p>
<a name="toward_boost_stm.appendices.implementation.language_like_macro_blocks.locking_macros"></a><h5>
-<a name="id4885320"></a>
+<a name="id4874692"></a>
<a href="implementation.html#toward_boost_stm.appendices.implementation.language_like_macro_blocks.locking_macros">Locking
Macros</a>
</h5>
@@ -79,7 +79,7 @@
are executed once and only once.
</p>
<a name="toward_boost_stm.appendices.implementation.language_like_macro_blocks.transaction_macros"></a><h5>
-<a name="id4885371"></a>
+<a name="id4874742"></a>
<a href="implementation.html#toward_boost_stm.appendices.implementation.language_like_macro_blocks.transaction_macros">Transaction
Macros</a>
</h5>
@@ -128,7 +128,7 @@
transaction is aborted.
</p>
<a name="toward_boost_stm.appendices.implementation.language_like_macro_blocks.correcting_non_compliant_compilers"></a><h5>
-<a name="id4885459"></a>
+<a name="id4874837"></a>
<a href="implementation.html#toward_boost_stm.appendices.implementation.language_like_macro_blocks.correcting_non_compliant_compilers">Correcting
Non-Compliant Compilers</a>
</h5>
@@ -161,11 +161,11 @@
<a name="toward_boost_stm.appendices.implementation.cache"></a>Cache
</h4></div></div></div>
<a name="toward_boost_stm.appendices.implementation.cache.dispersed"></a><h5>
-<a name="id4885587"></a>
+<a name="id4874976"></a>
<a href="implementation.html#toward_boost_stm.appendices.implementation.cache.dispersed">Dispersed</a>
</h5>
<a name="toward_boost_stm.appendices.implementation.cache.compact"></a><h5>
-<a name="id4885609"></a>
+<a name="id4874998"></a>
<a href="implementation.html#toward_boost_stm.appendices.implementation.cache.compact">Compact</a>
</h5>
</div>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/rationale.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/rationale.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/rationale.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -267,7 +267,7 @@
read).
</p>
<div class="table">
-<a name="id4865740"></a><p class="title"><b>Table 1.1. Comparaison with other STM systems</b></p>
+<a name="id4859643"></a><p class="title"><b>Table 1.1. Comparaison with other STM systems</b></p>
<table class="table" summary="Comparaison with other STM systems">
<colgroup>
<col>
@@ -472,7 +472,7 @@
handle each specific problem with the most appropriate configuration.
</p>
<div class="table">
-<a name="id4866122"></a><p class="title"><b>Table 1.2. Consistency versus Updating policies composition</b></p>
+<a name="id4860026"></a><p class="title"><b>Table 1.2. Consistency versus Updating policies composition</b></p>
<table class="table" summary="Consistency versus Updating policies composition">
<colgroup>
<col>
@@ -627,7 +627,7 @@
management</a>
</h5></div></div></div>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.priority_based_tasks"></a><h6>
-<a name="id4866453"></a>
+<a name="id4860355"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.priority_based_tasks">Priority-Based
Tasks</a>
</h6>
@@ -642,7 +642,7 @@
cases, user-defined priority-based transactions are necessary.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.approach"></a><h6>
-<a name="id4866491"></a>
+<a name="id4860394"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.approach">Approach</a>
</h6>
<p>
@@ -658,7 +658,7 @@
checking models. Last, we present our experimental results.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.attacking__amp__victim_transactions"></a><h6>
-<a name="id4866530"></a>
+<a name="id4860432"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.attacking__amp__victim_transactions">Attacking
& Victim Transactions</a>
</h6>
@@ -678,7 +678,7 @@
transaction since Ta may abort it.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.user_defined_priority_based_transactions"></a><h6>
-<a name="id4866577"></a>
+<a name="id4860481"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.user_defined_priority_based_transactions">User-Defined
Priority-Based Transactions</a>
</h6>
@@ -699,7 +699,7 @@
priority-based transactional environments.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.extensible_polymorphic_contention_management_interface"></a><h6>
-<a name="id4866627"></a>
+<a name="id4860530"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.contention_management.extensible_polymorphic_contention_management_interface">Extensible
Polymorphic Contention Management Interface</a>
</h6>
@@ -794,7 +794,7 @@
of experimental benchmarks on .
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.introduction"></a><h6>
-<a name="id4867336"></a>
+<a name="id4861239"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.introduction">Introduction</a>
</h6>
<p>
@@ -847,7 +847,7 @@
</li>
</ol></div>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.background"></a><h6>
-<a name="id4867436"></a>
+<a name="id4861367"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.background">Background</a>
</h6>
<p>
@@ -958,7 +958,7 @@
later sections.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.locks_outside_of_transactions__lot_"></a><h6>
-<a name="id4868031"></a>
+<a name="id4861949"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.locks_outside_of_transactions__lot_">Locks
Outside of Transactions (LoT)</a>
</h6>
@@ -1009,7 +1009,7 @@
<span class="number">27</span> <span class="keyword">int</span> <span class="identifier">lock3</span><span class="special">()</span> <span class="special">{</span> <span class="comment">/* no conflict */</span> <span class="special">}</span>
</pre>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lot_full_lock_protection"></a><h6>
-<a name="id4869196"></a>
+<a name="id4863112"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lot_full_lock_protection">LoT
Full Lock Protection</a>
</h6>
@@ -1039,7 +1039,7 @@
stalling.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lot_tm_lock_protection"></a><h6>
-<a name="id4869257"></a>
+<a name="id4863173"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lot_tm_lock_protection">LoT
TM-Lock Protection</a>
</h6>
@@ -1082,7 +1082,7 @@
the third lock protection policy.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lot_tx_lock_protection"></a><h6>
-<a name="id4869429"></a>
+<a name="id4863352"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lot_tx_lock_protection">LoT
TX-Lock Protection</a>
</h6>
@@ -1125,7 +1125,7 @@
cooperative performance while still adhering to the rule.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.locks_inside_of_transactions__lit_"></a><h6>
-<a name="id4765375"></a>
+<a name="id4863876"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.locks_inside_of_transactions__lit_">Locks
Inside of Transactions (LiT)</a>
</h6>
@@ -1239,7 +1239,7 @@
for the completeness of the example.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lit_full_lock_protection"></a><h6>
-<a name="id4871284"></a>
+<a name="id4864910"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lit_full_lock_protection">LiT
Full-Lock Protection</a>
</h6>
@@ -1269,7 +1269,7 @@
are all allowed to resume.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lit_tm_lock_protection"></a><h6>
-<a name="id4871345"></a>
+<a name="id4864971"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lit_tm_lock_protection">LiT
TM-Lock Protection</a>
</h6>
@@ -1299,7 +1299,7 @@
LiT protection policy, LiT TX-lock protection.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lit_tx_lock_protection"></a><h6>
-<a name="id4871418"></a>
+<a name="id4865034"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lit_tx_lock_protection">LiT
TX-Lock Protection</a>
</h6>
@@ -1339,7 +1339,7 @@
passed. When lockL3 completes tx3 begins and runs through to completion.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lock_composition"></a><h6>
-<a name="id4871494"></a>
+<a name="id4865111"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lock_composition">Lock
Composition</a>
</h6>
@@ -1423,7 +1423,7 @@
lock until the transaction commits.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.criticality_of_lit_lock_composition"></a><h6>
-<a name="id4872216"></a>
+<a name="id4865816"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.criticality_of_lit_lock_composition">Criticality
of LiT Lock Composition</a>
</h6>
@@ -1474,7 +1474,7 @@
cumulative affects of the move() operation.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.understanding_lit_lock_composition"></a><h6>
-<a name="id4872827"></a>
+<a name="id4866426"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.understanding_lit_lock_composition">Understanding
LiT Lock Composition</a>
</h6>
@@ -1563,7 +1563,7 @@
shared memory x2.
</p>
<a name="toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lit_lock_identification"></a><h6>
-<a name="id4873921"></a>
+<a name="id4867520"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.tm_specific_concepts.lock_aware_transaction.lit_lock_identification">LiT
Lock Identification</a>
</h6>
@@ -1873,7 +1873,7 @@
The following table is a compilation of the preceding analysis:
</p>
<div class="table">
-<a name="id4874464"></a><p class="title"><b>Table 1.3. Comparaison with other STM systems</b></p>
+<a name="id4868096"></a><p class="title"><b>Table 1.3. Comparaison with other STM systems</b></p>
<table class="table" summary="Comparaison with other STM systems">
<colgroup><col></colgroup>
<thead><tr>
@@ -2159,7 +2159,7 @@
support in the near future [4].
</p>
<div class="table">
-<a name="id4875591"></a><p class="title"><b>Table 1.4. Comparaison with other STM systems</b></p>
+<a name="id4869236"></a><p class="title"><b>Table 1.4. Comparaison with other STM systems</b></p>
<table class="table" summary="Comparaison with other STM systems">
<colgroup>
<col>
@@ -2257,7 +2257,7 @@
Table 1. TBoost.STM Mutual Exclusion Locking Parallel Constructs.
</p>
<a name="toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.library_based_lock_implementations"></a><h6>
-<a name="id4875799"></a>
+<a name="id4869444"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.library_based_lock_implementations">Library-based
Lock Implementations</a>
</h6>
@@ -2305,7 +2305,7 @@
scoping and programmer error.
</p>
<a name="toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.pitfalls_in_scoping_of_automatic_object_locks"></a><h6>
-<a name="id4876197"></a>
+<a name="id4869852"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.pitfalls_in_scoping_of_automatic_object_locks">Pitfalls
in Scoping of Automatic Object Locks</a>
</h6>
@@ -2378,7 +2378,7 @@
of locks results in unoptimized performance.
</p>
<a name="toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.library_based_transaction_implementations"></a><h6>
-<a name="id4880899"></a>
+<a name="id4870287"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.library_based_transaction_implementations">Library-based
Transaction Implementations</a>
</h6>
@@ -2432,7 +2432,7 @@
behaviors.
</p>
<a name="toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.pitfalls_in_transactional_execution_of_automatic_objects"></a><h6>
-<a name="id4881271"></a>
+<a name="id4870660"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.pitfalls_in_transactional_execution_of_automatic_objects">Pitfalls
in Transactional Execution of Automatic Objects</a>
</h6>
@@ -2527,7 +2527,7 @@
of direct language integration of TM instead of API-only approaches.
</p>
<a name="toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.disadvantages_of_language_based_transactional_integration"></a><h6>
-<a name="id4882270"></a>
+<a name="id4871659"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.disadvantages_of_language_based_transactional_integration">Disadvantages
of Language Based Transactional Integration</a>
</h6>
@@ -2564,7 +2564,7 @@
objects nor language-based parallel abstractions alone can provide.
</p>
<a name="toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.parallel_constructs_for_mutually_exclusive_locks"></a><h6>
-<a name="id4882347"></a>
+<a name="id4871736"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.parallel_constructs_for_mutually_exclusive_locks">Parallel
Constructs for Mutually Exclusive Locks</a>
</h6>
@@ -2600,7 +2600,7 @@
in client code.
</p>
<a name="toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.exception_based_timed_locks"></a><h6>
-<a name="id4882850"></a>
+<a name="id4872238"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.exception_based_timed_locks">Exception-based
Timed Locks</a>
</h6>
@@ -2687,7 +2687,7 @@
<span class="identifier">Figure</span> <span class="number">12.</span> <span class="identifier">Optimized</span> <span class="identifier">Timed</span> <span class="identifier">Locking</span> <span class="identifier">with</span> TBoost.STM<span class="special">.</span>
</pre>
<a name="toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.parallel_constructs_for_transactional_memory"></a><h6>
-<a name="id4884110"></a>
+<a name="id4873497"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.parallel_constructs_for_transactional_memory">Parallel
Constructs for Transactional Memory</a>
</h6>
@@ -2765,7 +2765,7 @@
correct behavior and then throwing an exception upward.
</p>
<a name="toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.transaction_nesting"></a><h6>
-<a name="id4884771"></a>
+<a name="id4874159"></a>
<a href="rationale.html#toward_boost_stm.appendices.rationale.c___and_library_specific_concepts.language_like_macro_blocks.transaction_nesting">Transaction
Nesting</a>
</h6>
@@ -2826,7 +2826,7 @@
with other STM systems</a>
</h4></div></div></div>
<div class="table">
-<a name="id4884898"></a><p class="title"><b>Table 1.5. Comparaison
+<a name="id4874269"></a><p class="title"><b>Table 1.5. Comparaison
with other STM systems</b></p>
<table class="table" summary="Comparaison
with other STM systems">
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/todo.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/todo.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/appendices/todo.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -44,7 +44,7 @@
to do before review</a>
</h4></div></div></div>
<a name="toward_boost_stm.appendices.todo.tasks_to_do_before_review.interface"></a><h5>
-<a name="id4887920"></a>
+<a name="id4881575"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.tasks_to_do_before_review.interface">Interface</a>
</h5>
<p>
@@ -192,7 +192,7 @@
</li>
</ul></div>
<a name="toward_boost_stm.appendices.todo.tasks_to_do_before_review.adding_some_components_to_boost_to_preparing_boostification_of_stm"></a><h5>
-<a name="id4888247"></a>
+<a name="id4881902"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.tasks_to_do_before_review.adding_some_components_to_boost_to_preparing_boostification_of_stm">Adding
some components to Boost to preparing Boostification of STM</a>
</h5>
@@ -232,7 +232,7 @@
</li>
</ul></div>
<a name="toward_boost_stm.appendices.todo.tasks_to_do_before_review.boostifying_stm"></a><h5>
-<a name="id4888351"></a>
+<a name="id4882006"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.tasks_to_do_before_review.boostifying_stm">Boostifying
STM</a>
</h5>
@@ -308,7 +308,7 @@
</li>
</ul></div>
<a name="toward_boost_stm.appendices.todo.tasks_to_do_before_review.implementation"></a><h5>
-<a name="id4888527"></a>
+<a name="id4882182"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.tasks_to_do_before_review.implementation">Implementation</a>
</h5>
<p>
@@ -335,28 +335,28 @@
</li>
</ul></div>
<a name="toward_boost_stm.appendices.todo.tasks_to_do_before_review.tests"></a><h5>
-<a name="id4888598"></a>
+<a name="id4882252"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.tasks_to_do_before_review.tests">Tests</a>
</h5>
<div class="itemizedlist"><ul type="disc"><li>
Add unit tests
</li></ul></div>
<a name="toward_boost_stm.appendices.todo.tasks_to_do_before_review.examples"></a><h5>
-<a name="id4888628"></a>
+<a name="id4882283"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.tasks_to_do_before_review.examples">Examples</a>
</h5>
<div class="itemizedlist"><ul type="disc"><li>
Add unit tests
</li></ul></div>
<a name="toward_boost_stm.appendices.todo.tasks_to_do_before_review.benchmarks"></a><h5>
-<a name="id4888658"></a>
+<a name="id4882313"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.tasks_to_do_before_review.benchmarks">Benchmarks</a>
</h5>
<div class="itemizedlist"><ul type="disc"><li>
Add some specific benchmarks.
</li></ul></div>
<a name="toward_boost_stm.appendices.todo.tasks_to_do_before_review.documentation"></a><h5>
-<a name="id4888689"></a>
+<a name="id4882344"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.tasks_to_do_before_review.documentation">Documentation</a>
</h5>
<div class="itemizedlist"><ul type="disc">
@@ -464,12 +464,12 @@
could be done after acceptation.
</p>
<a name="toward_boost_stm.appendices.todo.for_later_releases.integrate_with_stm_test_benchmarks_as_stamp_or_stmbench7"></a><h5>
-<a name="id4888932"></a>
+<a name="id4882586"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.for_later_releases.integrate_with_stm_test_benchmarks_as_stamp_or_stmbench7">Integrate
with STM test benchmarks as STAMP or STMBench7</a>
</h5>
<a name="toward_boost_stm.appendices.todo.for_later_releases.providing_closed_nested_transaction_that_are_not_flat"></a><h5>
-<a name="id4888958"></a>
+<a name="id4882612"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.for_later_releases.providing_closed_nested_transaction_that_are_not_flat">Providing
Closed Nested transaction that are not flat</a>
</h5>
@@ -479,12 +479,12 @@
the thread.
</p>
<a name="toward_boost_stm.appendices.todo.for_later_releases.allows_configuration_at_compile_time_and_run_time"></a><h5>
-<a name="id4888992"></a>
+<a name="id4882646"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.for_later_releases.allows_configuration_at_compile_time_and_run_time">Allows
configuration at compile-time and run-time</a>
</h5>
<a name="toward_boost_stm.appendices.todo.for_later_releases.add_explicit_outer_transaction"></a><h5>
-<a name="id4889016"></a>
+<a name="id4882671"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.for_later_releases.add_explicit_outer_transaction">Add
explicit outer transaction</a>
</h5>
@@ -504,22 +504,22 @@
that need a deep research.
</p>
<a name="toward_boost_stm.appendices.todo.more_recherch_needed.transactional_condition_variables"></a><h5>
-<a name="id4889070"></a>
+<a name="id4882726"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.more_recherch_needed.transactional_condition_variables">Transactional
condition variables</a>
</h5>
<a name="toward_boost_stm.appendices.todo.more_recherch_needed.mixing_stm_updating_policies"></a><h5>
-<a name="id4889094"></a>
+<a name="id4882750"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.more_recherch_needed.mixing_stm_updating_policies">Mixing
STM updating policies</a>
</h5>
<a name="toward_boost_stm.appendices.todo.more_recherch_needed.mixing_stm_consistency_checking"></a><h5>
-<a name="id4889119"></a>
+<a name="id4882775"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.more_recherch_needed.mixing_stm_consistency_checking">Mixing
STM consistency checking</a>
</h5>
<a name="toward_boost_stm.appendices.todo.more_recherch_needed.suspend_resume_transactions"></a><h5>
-<a name="id4889144"></a>
+<a name="id4882800"></a>
<a href="todo.html#toward_boost_stm.appendices.todo.more_recherch_needed.suspend_resume_transactions">Suspend/resume
transactions</a>
</h5>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/overview.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/overview.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/overview.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -28,7 +28,7 @@
</h2></div></div></div>
<div class="toc"><dl><dt><span class="section"> Introduction</span></dt></dl></div>
<a name="toward_boost_stm.overview.description"></a><h3>
-<a name="id4803158"></a>
+<a name="id4803160"></a>
<a href="overview.html#toward_boost_stm.overview.description">Description</a>
</h3>
<p>
@@ -55,10 +55,10 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- Optimistic concurrency
+<span class="bold"><strong>Optimistic</strong></span> concurrency
</li>
<li>
- ACI transactions
+<span class="bold"><strong>ACI</strong></span> transactions
<div class="itemizedlist"><ul type="circle">
<li>
Atomic: all operations execute or none do
@@ -72,31 +72,33 @@
</ul></div>
</li>
<li>
- Language-like atomic transaction macro blocks
+<span class="bold"><strong>Language-like</strong></span> atomic transaction macro blocks
</li>
<li>
Closed, flattened composable transactions
</li>
<li>
- Direct and deferred updating run-time policies
+<span class="bold"><strong>Direct</strong></span> and <span class="bold"><strong>deferred
+ updating</strong></span> run-time policies
</li>
<li>
- Validation and invalidation conflict detection policies
+<span class="bold"><strong>Validation</strong></span> and <span class="bold"><strong>invalidation</strong></span>
+ conflict detection policies
</li>
<li>
- Lock-aware transactions
+<span class="bold"><strong>Lock-aware</strong></span> transactions
</li>
<li>
- Programmable contention management, enabling programmers to specify forward
- progress mechanisms
+<span class="bold"><strong>Programmable contention management</strong></span>, enabling
+ programmers to specify forward progress mechanisms
</li>
<li>
- Isolated and irrevocable transactions for transactions that must commit (i.e.,
- I/O transactions)
+ Isolated and <span class="bold"><strong>irrevocable</strong></span> transactions for
+ transactions that must commit (i.e., I/O transactions)
</li>
</ul></div>
<a name="toward_boost_stm.overview.how_to_use_this_documentation"></a><h3>
-<a name="id4764828"></a>
+<a name="id4764876"></a>
<a href="overview.html#toward_boost_stm.overview.how_to_use_this_documentation">How
to Use This Documentation</a>
</h3>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/overview/intro.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/overview/intro.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/overview/intro.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -27,18 +27,19 @@
<a name="toward_boost_stm.overview.intro"></a> Introduction
</h3></div></div></div>
<a name="toward_boost_stm.overview.intro.transactional_memory"></a><h4>
-<a name="id4765111"></a>
+<a name="id4765159"></a>
<a href="intro.html#toward_boost_stm.overview.intro.transactional_memory">Transactional
Memory</a>
</h4>
<p>
- Transactional memory is a modern type of concurrency control that uses transactions
- as its synchronization mechanism. A transaction is a finite sequence of operations
- that are executed in an atomic, isolated and consistent manner. The atomicity,
- isolation and consistency (ACI) of transaction's are derived from the ACID
- principle in the database community. TM does not exhibit the D (durability)
- of ACID because unlike database transactions, TM transactions are not saved
- to permanent storage (e.g., hard drives).
+ Transactional memory(TM) is a modern type of concurrency control that uses
+ transactions as its synchronization mechanism. A transaction is a finite
+ sequence of operations that are executed in an <span class="bold"><strong>atomic</strong></span>,
+ <span class="bold"><strong>isolated</strong></span> and <span class="bold"><strong>consistent</strong></span>
+ manner. The atomicity, isolation and consistency (<span class="bold"><strong>ACI</strong></span>)
+ of transaction's are derived from the ACID principle in the database community.
+ TM does not exhibit the D (durability) of ACID because unlike database transactions,
+ TM transactions are not saved to permanent storage (e.g., hard drives).
</p>
<p>
Transactions are executed speculatively (optimistically) and are checked
@@ -47,7 +48,7 @@
between those points make up the transaction's execution body. Transactions
are commonly represented using the atomic structure shown in the figure below.
</p>
-<pre class="programlisting"><span class="number">1</span> <span class="identifier">atomic</span>
+<pre class="programlisting"><span class="number">1</span> <span class="identifier">transaction</span>
<span class="number">2</span> <span class="special">{</span>
<span class="number">3</span> <span class="special">++</span><span class="identifier">x</span><span class="special">;</span>
<span class="number">4</span> <span class="special">--</span><span class="identifier">y</span><span class="special">;</span>
@@ -108,15 +109,15 @@
(2) scalability and (3) modularity.
</p>
<a name="toward_boost_stm.overview.intro.simplicity"></a><h4>
-<a name="id4765653"></a>
+<a name="id4765469"></a>
<a href="intro.html#toward_boost_stm.overview.intro.simplicity">Simplicity</a>
</h4>
<p>
Synchronization problems, such as deadlocks, livelocks and priority inversion
are common in software systems using mutual exclusion. TM avoids many of
these problems by providing a synchronization mechanism that does not expose
- any of its implementation details to the programmer. The only interfaces
- the programmer needs to use for TM is as follows:
+ any of its implementation details to the programmer. The only low level interfaces
+ the programmer needs to use for TM are:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
@@ -151,11 +152,11 @@
alongside an actual STM library implementation is shown in Figure 3.
</p>
<pre class="programlisting"><span class="number">1</span> <span class="comment">// TM interfaces // __Boost_STM__
-</span><span class="number">2</span> <span class="keyword">do</span> <span class="special">{</span> <span class="identifier">atomic</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span>
+</span><span class="number">2</span> <span class="keyword">do</span> <span class="special">{</span> <span class="identifier">BOOST_STM_TRANSACTION</span>
<span class="number">3</span> <span class="identifier">begin_tx</span><span class="special">();</span> <span class="special">{</span>
-<span class="number">4</span> <span class="identifier">write</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">read</span><span class="special">(</span><span class="identifier">x</span><span class="special">)+</span><span class="number">1</span><span class="special">);</span> <span class="special">++</span><span class="identifier">t</span><span class="special">.</span><span class="identifier">write</span><span class="special">(</span><span class="identifier">x</span><span class="special">);</span>
-<span class="number">5</span> <span class="identifier">write</span><span class="special">(</span><span class="identifier">y</span><span class="special">,</span> <span class="identifier">read</span><span class="special">(</span><span class="identifier">y</span><span class="special">)-</span><span class="number">1</span><span class="special">);</span> <span class="special">--</span><span class="identifier">t</span><span class="special">.</span><span class="identifier">write</span><span class="special">(</span><span class="identifier">y</span><span class="special">);</span>
-<span class="number">6</span> <span class="special">}</span> <span class="keyword">while</span> <span class="special">(</span><span class="identifier">end_tx</span><span class="special">());</span> <span class="special">}</span> <span class="identifier">before_retry</span> <span class="special">{}</span>
+<span class="number">4</span> <span class="identifier">write</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">read</span><span class="special">(</span><span class="identifier">x</span><span class="special">)+</span><span class="number">1</span><span class="special">);</span> <span class="special">++</span><span class="identifier">x</span><span class="special">;</span>
+<span class="number">5</span> <span class="identifier">write</span><span class="special">(</span><span class="identifier">y</span><span class="special">,</span> <span class="identifier">read</span><span class="special">(</span><span class="identifier">y</span><span class="special">)-</span><span class="number">1</span><span class="special">);</span> <span class="special">--</span><span class="identifier">y</span><span class="special">;</span>
+<span class="number">6</span> <span class="special">}</span> <span class="keyword">while</span> <span class="special">(</span><span class="identifier">end_tx</span><span class="special">());</span> <span class="special">}</span> <span class="identifier">BOOST_STM_END_TRANSACTION</span>
<span class="identifier">Figure</span> <span class="number">3.</span> <span class="identifier">Transaction</span> <span class="identifier">Using</span> <span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="identifier">Explicit</span> <span class="identifier">TM</span> <span class="identifier">Interfaces</span> <span class="keyword">and</span> <span class="special">(</span><span class="number">2</span><span class="special">)</span> TBoost.STM<span class="special">.</span>
</pre>
@@ -176,7 +177,7 @@
conditions or deadlocks to occur. Furthermore, the programmer does not need
any program-specific knowledge to use shared data; he or she simply uses
the TM interfaces supplied by the system and the resulting behavior is guaranteed
- to be consistent. This is explained in greater detail in Section 3.1.
+ to be consistent. This is explained in greater detail in Section ???3.1.
</p>
<p>
Other types of concurrency control, such as mutual exclusion, cannot achieve
@@ -212,7 +213,7 @@
<span class="number">7</span> <span class="identifier">unlock</span><span class="special">(</span><span class="identifier">mutexX</span><span class="special">);</span>
</pre>
<a name="toward_boost_stm.overview.intro.understanding_concurrency_hazards"></a><h4>
-<a name="id4758679"></a>
+<a name="id4758701"></a>
<a href="intro.html#toward_boost_stm.overview.intro.understanding_concurrency_hazards">Understanding
Concurrency Hazards</a>
</h4>
@@ -270,7 +271,7 @@
modules can range from difficult to impossible.
</p>
<a name="toward_boost_stm.overview.intro.testing__race_conditions_and_interleavings"></a><h4>
-<a name="id4758793"></a>
+<a name="id4758814"></a>
<a href="intro.html#toward_boost_stm.overview.intro.testing__race_conditions_and_interleavings">Testing:
Race Conditions and Interleavings</a>
</h4>
@@ -346,7 +347,7 @@
all serial orders.
</p>
<a name="toward_boost_stm.overview.intro.development__mutual_exclusion_and_tm"></a><h4>
-<a name="id4759159"></a>
+<a name="id4759176"></a>
<a href="intro.html#toward_boost_stm.overview.intro.development__mutual_exclusion_and_tm">Development:
Mutual Exclusion and TM</a>
</h4>
@@ -372,7 +373,7 @@
performance, as is commonly found in fine-grained mutual exclusion implementations.
</p>
<a name="toward_boost_stm.overview.intro.scalability"></a><h4>
-<a name="id4759212"></a>
+<a name="id4759229"></a>
<a href="intro.html#toward_boost_stm.overview.intro.scalability">Scalability</a>
</h4>
<p>
@@ -384,7 +385,7 @@
by a concurrency control type while executing concurrently.
</p>
<a name="toward_boost_stm.overview.intro.pessimistic_and_optimistic_critical_sections"></a><h4>
-<a name="id4759236"></a>
+<a name="id4759262"></a>
<a href="intro.html#toward_boost_stm.overview.intro.pessimistic_and_optimistic_critical_sections">Pessimistic
and Optimistic Critical Sections</a>
</h4>
@@ -397,7 +398,7 @@
use optimistic critical sections.
</p>
<a name="toward_boost_stm.overview.intro.truly_optimistic_critical_sections"></a><h4>
-<a name="id4759268"></a>
+<a name="id4759286"></a>
<a href="intro.html#toward_boost_stm.overview.intro.truly_optimistic_critical_sections">Truly
Optimistic Critical Sections</a>
</h4>
@@ -454,7 +455,7 @@
addresses, both g1=0,g2=0 and g1=1,g2=1 are legal states.
</p>
<a name="toward_boost_stm.overview.intro.direct_and_deferred_update"></a><h4>
-<a name="id4759763"></a>
+<a name="id4759781"></a>
<a href="intro.html#toward_boost_stm.overview.intro.direct_and_deferred_update">Direct
and Deferred Update</a>
</h4>
@@ -503,7 +504,7 @@
update without special effort.
</p>
<a name="toward_boost_stm.overview.intro.scalability__mutual_exclusion_and_transactional_memory"></a><h4>
-<a name="id4759852"></a>
+<a name="id4759870"></a>
<a href="intro.html#toward_boost_stm.overview.intro.scalability__mutual_exclusion_and_transactional_memory">Scalability:
Mutual Exclusion and Transactional Memory</a>
</h4>
@@ -584,7 +585,7 @@
mathematical limitations in mutual exclusion's performance scalability.
</p>
<a name="toward_boost_stm.overview.intro.modularity"></a><h4>
-<a name="id4813029"></a>
+<a name="id4813054"></a>
<a href="intro.html#toward_boost_stm.overview.intro.modularity">Modularity</a>
</h4>
<p>
@@ -605,7 +606,7 @@
do not support software modularity are, in short, impractical.
</p>
<a name="toward_boost_stm.overview.intro.mutual_exclusion_and_software_modularity"></a><h4>
-<a name="id4813073"></a>
+<a name="id4813104"></a>
<a href="intro.html#toward_boost_stm.overview.intro.mutual_exclusion_and_software_modularity">Mutual
Exclusion and Software Modularity</a>
</h4>
@@ -681,16 +682,16 @@
cannot be abstracted away and any programmer wishing to reuse the mutually
exclusive code must be able to access and extend the implementation details.
</p>
-<pre class="programlisting"><span class="number">1</span> <span class="keyword">void</span> <span class="identifier">inc</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">atomic</span> <span class="special">{</span> <span class="identifier">g</span> <span class="special">+=</span> <span class="identifier">v</span><span class="special">;</span> <span class="special">}</span> <span class="special">}</span>
+<pre class="programlisting"><span class="number">1</span> <span class="keyword">void</span> <span class="identifier">inc</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">transaction</span> <span class="special">{</span> <span class="identifier">g</span> <span class="special">+=</span> <span class="identifier">v</span><span class="special">;</span> <span class="special">}</span> <span class="special">}</span>
<span class="number">2</span>
-<span class="number">3</span> <span class="keyword">void</span> <span class="identifier">mult</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">atomic</span> <span class="special">{</span> <span class="identifier">g</span> <span class="special">*=</span> <span class="identifier">v</span><span class="special">;</span> <span class="special">}</span> <span class="special">}</span>
+<span class="number">3</span> <span class="keyword">void</span> <span class="identifier">mult</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">transaction</span> <span class="special">{</span> <span class="identifier">g</span> <span class="special">*=</span> <span class="identifier">v</span><span class="special">;</span> <span class="special">}</span> <span class="special">}</span>
<span class="number">4</span>
-<span class="number">5</span> <span class="keyword">int</span> <span class="identifier">get</span><span class="special">()</span> <span class="special">{</span> <span class="identifier">atomic</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">g</span><span class="special">;</span> <span class="special">}</span> <span class="special">}</span>
+<span class="number">5</span> <span class="keyword">int</span> <span class="identifier">get</span><span class="special">()</span> <span class="special">{</span> <span class="identifier">transaction</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">g</span><span class="special">;</span> <span class="special">}</span> <span class="special">}</span>
<span class="identifier">Figure</span> <span class="number">9.</span> <span class="identifier">TM</span> <span class="identifier">of</span> <span class="identifier">Increment</span><span class="special">,</span> <span class="identifier">Multiply</span> <span class="keyword">and</span> <span class="identifier">Get</span> <span class="identifier">of</span> <span class="identifier">Shared</span> <span class="identifier">Variable</span><span class="special">.</span>
</pre>
<a name="toward_boost_stm.overview.intro.summary_of_mutual_exclusion_modularity"></a><h4>
-<a name="id4814086"></a>
+<a name="id4814118"></a>
<a href="intro.html#toward_boost_stm.overview.intro.summary_of_mutual_exclusion_modularity">Summary
of Mutual Exclusion Modularity</a>
</h4>
@@ -703,7 +704,7 @@
not support software modularity.
</p>
<a name="toward_boost_stm.overview.intro.transactional_memory_and_software_modularity"></a><h4>
-<a name="id4814127"></a>
+<a name="id4814158"></a>
<a href="intro.html#toward_boost_stm.overview.intro.transactional_memory_and_software_modularity">Transactional
Memory and Software Modularity</a>
</h4>
@@ -721,7 +722,7 @@
conflict detection times, updating policies, and contention management schemes.
</p>
<a name="toward_boost_stm.overview.intro.achieving_tm_software_modularity"></a><h4>
-<a name="id4814167"></a>
+<a name="id4814199"></a>
<a href="intro.html#toward_boost_stm.overview.intro.achieving_tm_software_modularity">Achieving
TM Software Modularity</a>
</h4>
@@ -749,16 +750,16 @@
to make the above operations atomic, the programmer need only make the following
modification shown in Figure 10.
</p>
-<pre class="programlisting"><span class="number">1</span> <span class="identifier">atomic</span> <span class="special">{</span> <span class="comment">// atomic {
-</span><span class="number">2</span> <span class="identifier">inc</span><span class="special">(</span><span class="identifier">a</span><span class="special">);</span> <span class="comment">// atomic { g += a; }
-</span><span class="number">3</span> <span class="identifier">mult</span><span class="special">(-</span><span class="identifier">b</span><span class="special">);</span> <span class="comment">// atomic { g *= -b; }
-</span><span class="number">4</span> <span class="special">}</span> <span class="comment">// }
+<pre class="programlisting"><span class="number">1</span> <span class="identifier">transaction</span> <span class="special">{</span> <span class="comment">// transaction {
+</span><span class="number">2</span> <span class="identifier">inc</span><span class="special">(</span><span class="identifier">a</span><span class="special">);</span> <span class="comment">// transaction { g += a; }
+</span><span class="number">3</span> <span class="identifier">mult</span><span class="special">(-</span><span class="identifier">b</span><span class="special">);</span> <span class="comment">// transaction { g *= -b; }
+</span><span class="number">4</span> <span class="special">}</span> <span class="comment">// }
</span>
<span class="identifier">Figure</span> <span class="number">10.</span> <span class="identifier">Modularity</span><span class="special">:</span> <span class="identifier">Transaction</span> <span class="identifier">of</span> <span class="identifier">Increment</span> <span class="keyword">and</span> <span class="identifier">Multiply</span><span class="special">.</span>
</pre>
<p>
In effect, the TM system subsumes the transactions that are nested inside
- of the inc() and mult() operations. 6 The left side of Figure 10 shows the
+ of the inc() and mult() operations. The left side of Figure 10 shows the
actual code of the transaction, while the right side shows the child transactions
that are subsumed by the parent transaction.
</p>
@@ -799,7 +800,7 @@
level of software modularity.
</p>
<a name="toward_boost_stm.overview.intro.summary_of_transactional_memory_modularity"></a><h4>
-<a name="id4814528"></a>
+<a name="id4814560"></a>
<a href="intro.html#toward_boost_stm.overview.intro.summary_of_transactional_memory_modularity">Summary
of Transactional Memory Modularity</a>
</h4>
@@ -813,7 +814,7 @@
or subsumed into a larger transaction.
</p>
<a name="toward_boost_stm.overview.intro.c___library_language_like_solution"></a><h4>
-<a name="id4814561"></a>
+<a name="id4814594"></a>
<a href="intro.html#toward_boost_stm.overview.intro.c___library_language_like_solution">C++
library language-like solution</a>
</h4>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -45,33 +45,29 @@
<dt><span class="section"><a href="reference/core.html#toward_boost_stm.reference.core.transaction_bookkeeping_hpp">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transaction_bookkeeping</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
</dl></dd>
-<dt><span class="section"><a href="reference/mixins_transactional_objects.html">Mixins
- Transactional Objects</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="reference/mixins_transactional_objects.html#toward_boost_stm.reference.mixins_transactional_objects.deep_copy">Deep
- Copy</a></span></dt>
-<dt><span class="section"><a href="reference/mixins_transactional_objects.html#toward_boost_stm.reference.mixins_transactional_objects.shallow_copy">Shallow
- Copy</a></span></dt>
-<dt><span class="section"><a href="reference/mixins_transactional_objects.html#toward_boost_stm.reference.mixins_transactional_objects.smart_pointers">Smart
- pointers</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="reference/warppers_transactional_objects.html">Warppers
- Transactional Objects</a></span></dt>
+<dt><span class="section"><a href="reference/transactional_objects.html">Transactional
+ Objects</a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="reference/warppers_transactional_objects.html#toward_boost_stm.reference.warppers_transactional_objects.transactional_object_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transactional_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="reference/warppers_transactional_objects.html#toward_boost_stm.reference.warppers_transactional_objects.smart_pointers">Smart
- pointers</a></span></dt>
+<dt><span class="section"><a href="reference/transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">deep_transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">shallow_transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/transactional_objects.html#toward_boost_stm.reference.transactional_objects.txs_ptr_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
</dl></dd>
-<dt><span class="section"><a href="reference/non_transactional_objects.html">Non
+<dt><span class="section"><a href="reference/built_in_transactional_objects.html">Built-in
Transactional Objects</a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="reference/non_transactional_objects.html#toward_boost_stm.reference.non_transactional_objects.non_tx_numeric_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">non_tx</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="reference/non_transactional_objects.html#toward_boost_stm.reference.non_transactional_objects.non_tx_pointer_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">non_tx</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="reference/non_transactional_objects.html#toward_boost_stm.reference.non_transactional_objects.smart_pointers">Smart
- pointers</a></span></dt>
+<dt><span class="section"><a href="reference/built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_proxy_cache_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">proxy_cache</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_numeric_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_pointer_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
</dl></dd>
<dt><span class="section"><a href="reference/contention_managers.html">Contention
Managers</a></span></dt>
Added: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/built_in_transactional_objects.html
==============================================================================
--- (empty file)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/built_in_transactional_objects.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -0,0 +1,273 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Built-in
+ Transactional Objects</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Toward.Boost.STM">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="transactional_objects.html" title="Transactional
+ Objects">
+<link rel="next" href="contention_managers.html" title="Contention
+ Managers">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="TowardBoostSTM" width="277" height="86" src="../../../image/Toward_Boost_STM.jpg"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="transactional_objects.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="contention_managers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects"></a><a href="built_in_transactional_objects.html" title="Built-in
+ Transactional Objects">Built-in
+ Transactional Objects</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_proxy_cache_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">proxy_cache</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_proxy_cache_hpp.template_class__tx__proxy_cache___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">proxy_cache</span><span class="special"><></span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp.template_class__tx__object___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">object</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp.template_class__tx__pointer_to_member___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer_to_member</span><span class="special"><></span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_numeric_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_numeric_hpp.template_class__tx__numeric___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">numeric</span><span class="special"><></span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_pointer_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_pointer_hpp.template_class__tx__pointer___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer</span><span class="special"><></span></code></a></span></dt></dl></dd>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects.tx_proxy_cache_hpp"></a><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_proxy_cache_hpp" title="
+ Header <boost/stm/tx/proxy_cache.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">proxy_cache</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_proxy_cache_hpp.template_class__tx__proxy_cache___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">proxy_cache</span><span class="special"><></span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tx</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base</span><span class="special">=</span><span class="identifier">base_transaction_object</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">proxy_cache</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">B</span><span class="special">></span>
+ <span class="keyword">struct</span> <span class="identifier">has_shallow_copy_semantics</span><span class="special"><</span><span class="identifier">tx</span><span class="special">::</span><span class="identifier">proxy_cache</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">B</span><span class="special">></span> <span class="special">>;</span>
+
+<span class="special">}}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects.tx_proxy_cache_hpp.template_class__tx__proxy_cache___"></a><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_proxy_cache_hpp.template_class__tx__proxy_cache___" title="Template
+ Class tx::proxy_cache<>">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">proxy_cache</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base</span><span class="special">=</span><span class="identifier">base_transaction_object</span><span class="special">></span>
+<span class="keyword">class</span> <span class="identifier">proxy_cache</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">transaction_object</span><span class="special"><</span> <span class="identifier">Final</span><span class="special">,</span> <span class="identifier">Base</span> <span class="special">></span> <span class="special">{</span>
+<span class="keyword">protected</span><span class="special">:</span>
+ <span class="identifier">T</span> <span class="identifier">val_</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">proxy_cache</span><span class="special"><</span><span class="identifier">Final</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Base</span><span class="special">></span> <span class="identifier">this_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Final</span> <span class="identifier">final_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="identifier">proxy_cache</span><span class="special">();</span>
+ <span class="identifier">proxy_cache</span><span class="special">(</span><span class="identifier">proxy_cache</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
+ <span class="identifier">proxy_cache</span><span class="special">(</span><span class="identifier">proxy_cache</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span><span class="identifier">U</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+ <span class="identifier">proxy_cache</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
+ <span class="identifier">proxy_cache</span><span class="special">(</span><span class="identifier">U</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="identifier">proxy_cache</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">proxy_cache</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
+ <span class="identifier">proxy_cache</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">proxy_cache</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span><span class="identifier">U</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">&();</span>
+ <span class="identifier">T</span><span class="special">*</span> <span class="identifier">address_of</span><span class="special">();</span>
+
+ <span class="identifier">T</span><span class="special">&</span> <span class="identifier">ref</span><span class="special">();</span>
+ <span class="identifier">T</span> <span class="identifier">value</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">proxy_cache</span><span class="special">(</span><span class="identifier">proxy_cache</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">,</span> <span class="identifier">stm</span><span class="special">::</span><span class="identifier">shallow_t</span><span class="special">);</span>
+ <span class="identifier">proxy_cache</span><span class="special">&</span> <span class="identifier">shallow_assign</span><span class="special">(</span><span class="identifier">proxy_cache</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp"></a><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp" title="
+ Header <boost/stm/tx/pointer.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp.template_class__tx__object___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">object</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp.template_class__tx__pointer_to_member___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer_to_member</span><span class="special"><></span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tx</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">object</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+ <span class="keyword">struct</span> <span class="identifier">has_shallow_copy_semantics</span><span class="special"><</span><span class="identifier">tx</span><span class="special">::</span><span class="identifier">object</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">>;</span>
+
+<span class="special">}}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp.template_class__tx__object___"></a><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp.template_class__tx__object___" title="Template
+ Class tx::object<>">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">object</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+<span class="keyword">class</span> <span class="identifier">object</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">proxy_cache</span><span class="special"><</span> <span class="identifier">object</span><span class="special"><</span><span class="identifier">T</span><span class="special">>,</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">object</span><span class="special">();</span>
+ <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
+ <span class="identifier">object</span><span class="special">(</span><span class="identifier">object</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+ <span class="identifier">object</span><span class="special">(</span><span class="identifier">object</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
+ <span class="identifier">object</span><span class="special">(</span><span class="identifier">U</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">object</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">object</span><span class="special">(</span><span class="identifier">object</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">,</span> <span class="identifier">stm</span><span class="special">::</span><span class="identifier">shallow_t</span><span class="special">);</span>
+ <span class="identifier">object</span><span class="special">&</span> <span class="identifier">shallow_assign</span><span class="special">(</span><span class="identifier">object</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp.template_class__tx__pointer_to_member___"></a><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_object_hpp.template_class__tx__pointer_to_member___" title="Template
+ Class tx::pointer_to_member<>">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer_to_member</span><span class="special"><></span></code></a>
+</h5></div></div></div></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects.tx_numeric_hpp"></a><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_numeric_hpp" title="
+ Header <boost/stm/tx/numeric.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_numeric_hpp.template_class__tx__numeric___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">numeric</span><span class="special"><></span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tx</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">numeric</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+ <span class="keyword">struct</span> <span class="identifier">has_shallow_copy_semantics</span><span class="special"><</span><span class="identifier">tx</span><span class="special">::</span><span class="identifier">numeric</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">>;</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">bool</span><span class="special">></span> <span class="identifier">boolean</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">char_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">uchar_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">short</span><span class="special">></span> <span class="identifier">short_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">short</span><span class="special">></span> <span class="identifier">ushort_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">int_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">uint_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">long</span><span class="special">></span> <span class="identifier">long_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">></span> <span class="identifier">ulong_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">float_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">double_t</span><span class="special">;</span>
+
+<span class="special">}}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects.tx_numeric_hpp.template_class__tx__numeric___"></a><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_numeric_hpp.template_class__tx__numeric___" title="Template
+ Class tx::numeric<>">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">numeric</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+<span class="keyword">class</span> <span class="identifier">numeric</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">proxy_cache</span><span class="special"><</span> <span class="identifier">numeric</span><span class="special"><</span><span class="identifier">T</span><span class="special">>,</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">numeric</span><span class="special">();</span>
+ <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span>
+ <span class="identifier">numeric</span><span class="special">(</span><span class="identifier">numeric</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
+ <span class="identifier">numeric</span><span class="special">(</span><span class="identifier">U</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="identifier">numeric</span><span class="special">(</span><span class="identifier">numeric</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">,</span> <span class="identifier">stm</span><span class="special">::</span><span class="identifier">shallow_t</span><span class="special">);</span>
+ <span class="identifier">numeric</span><span class="special">&</span> <span class="identifier">shallow_assign</span><span class="special">(</span><span class="identifier">numeric</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects.tx_pointer_hpp"></a><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_pointer_hpp" title="
+ Header <boost/stm/tx/pointer.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_pointer_hpp.template_class__tx__pointer___">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer</span><span class="special"><></span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tx</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">pointer</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+ <span class="keyword">struct</span> <span class="identifier">has_shallow_copy_semantics</span><span class="special"><</span><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">>;</span>
+
+<span class="special">}}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.built_in_transactional_objects.tx_pointer_hpp.template_class__tx__pointer___"></a><a href="built_in_transactional_objects.html#toward_boost_stm.reference.built_in_transactional_objects.tx_pointer_hpp.template_class__tx__pointer___" title="Template
+ Class tx::pointer<>">Template
+ Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+<span class="keyword">class</span> <span class="identifier">pointer</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">proxy_cache</span><span class="special"><</span> <span class="identifier">pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">>,</span> <span class="identifier">T</span><span class="special">*</span> <span class="special">></span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">pointer</span><span class="special">();</span>
+ <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">pointer</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span>
+ <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">pointer</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">U</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">V</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">B</span><span class="special">></span>
+ <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">proxy_cache</span><span class="special"><</span><span class="identifier">U</span><span class="special">,</span> <span class="identifier">V</span><span class="special">*,</span> <span class="identifier">B</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">v</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
+ <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">U</span><span class="special">*</span> <span class="identifier">v</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">U</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">V</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">B</span><span class="special">></span>
+ <span class="identifier">pointer</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">proxy_cache</span><span class="special"><</span><span class="identifier">U</span><span class="special">,</span> <span class="identifier">V</span><span class="special">*,</span> <span class="identifier">B</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+ <span class="identifier">T</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">pointer</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">,</span> <span class="identifier">stm</span><span class="special">::</span><span class="identifier">shallow_t</span><span class="special">);</span>
+ <span class="comment">// shallow assignment
+</span> <span class="identifier">pointer</span><span class="special">&</span> <span class="identifier">shallow_assign</span><span class="special">(</span><span class="identifier">pointer</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
+
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2009 Justin E. Gottchlich<br>Copyright © 2009 Vicente J. Botet Escriba<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="transactional_objects.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="contention_managers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/contention_managers.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/contention_managers.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/contention_managers.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -7,7 +7,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="../../index.html" title="Chapter 1. Toward.Boost.STM">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="non_transactional_objects.html" title="Non
+<link rel="prev" href="built_in_transactional_objects.html" title="Built-in
Transactional Objects">
<link rel="next" href="../examples.html" title="Examples">
</head>
@@ -22,7 +22,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="non_transactional_objects.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="built_in_transactional_objects.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -346,7 +346,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="non_transactional_objects.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="built_in_transactional_objects.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/core.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/core.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/core.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -7,8 +7,8 @@
<link rel="start" href="../../index.html" title="Chapter 1. Toward.Boost.STM">
<link rel="up" href="../reference.html" title="Reference">
<link rel="prev" href="stm_hpp.html" title=" Header <boost/stm.hpp>">
-<link rel="next" href="mixins_transactional_objects.html" title="Mixins
- Transactional Objects">
+<link rel="next" href="transactional_objects.html" title="Transactional
+ Objects">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -21,7 +21,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="stm_hpp.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mixins_transactional_objects.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="stm_hpp.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="transactional_objects.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -1961,7 +1961,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="stm_hpp.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mixins_transactional_objects.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="stm_hpp.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="transactional_objects.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/transactional_objects.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/transactional_objects.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/reference/transactional_objects.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -8,7 +8,7 @@
<link rel="start" href="../../index.html" title="Chapter 1. Toward.Boost.STM">
<link rel="up" href="../reference.html" title="Reference">
<link rel="prev" href="core.html" title="Core">
-<link rel="next" href="non_transactional_objects.html" title="Non
+<link rel="next" href="built_in_transactional_objects.html" title="Built-in
Transactional Objects">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -22,7 +22,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="core.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="non_transactional_objects.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="core.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="built_in_transactional_objects.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -31,930 +31,499 @@
Objects</a>
</h3></div></div></div>
<div class="toc"><dl>
-<dt><span class="section">Mixins</span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">deep_transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___">Template
+ Class <code class="computeroutput"><span class="identifier">deep_transaction_object</span><span class="special"><></span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">shallow_transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy">Deep
- Copy</a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy">Shallow
- Copy</a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.smart_pointers">Smart
- pointers</a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.class__shallow_t_">Class
+ <code class="computeroutput"><span class="identifier">shallow_t</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.constant__shallow_">Constant
+ <code class="computeroutput"><span class="identifier">shallow</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__has_shallow_copy_semantics___">Template
+ Class <code class="computeroutput"><span class="identifier">has_shallow_copy_semantics</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___">Template
+ Class <code class="computeroutput"><span class="identifier">shallow_transaction_object</span><span class="special"><></span></code></a></span></dt>
</dl></dd>
-<dt><span class="section">Warppers</span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transactional_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers">Smart
- pointers</a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__virtually___">Template
+ Class <code class="computeroutput"><span class="identifier">virtually</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__transaction_object___">Template
+ Class <code class="computeroutput"><span class="identifier">transaction_object</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__native_trans___">Template
+ Class <code class="computeroutput"><span class="identifier">native_trans</span><span class="special"><></span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.txs_ptr_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.txs_ptr_hpp.template_class__read_ptr___">Template
+ Class <code class="computeroutput"><span class="identifier">read_ptr</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.txs_ptr_hpp.template_class__write_ptr___">Template
+ Class <code class="computeroutput"><span class="identifier">write_ptr</span><span class="special"><></span></code></a></span></dt>
</dl></dd>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins"></a>Mixins
+<a name="toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp" title="
+ Header <boost/stm/deep_transaction_object.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">deep_transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
</h4></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy">Deep
- Copy</a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy">Shallow
- Copy</a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.smart_pointers">Smart
- pointers</a></span></dt>
-</dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy" title="Deep
- Copy">Deep
- Copy</a>
-</h5></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_ptr_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transaction_object_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_numeric_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_pointer_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-</dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp" title="
- Header <boost/stm/transaction_object.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h6></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___">Template
- Class <code class="computeroutput"><span class="identifier">transaction_object</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__native_trans___">Template
- Class <code class="computeroutput"><span class="identifier">native_trans</span><span class="special"><></span></code></a></span></dt>
-</dl></div>
+<div class="toc"><dl><dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___">Template
+ Class <code class="computeroutput"><span class="identifier">deep_transaction_object</span><span class="special"><></span></code></a></span></dt></dl></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">transaction_object</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">native_trans</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base</span><span class="special">=</span><span class="identifier">base_transaction_object</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">deep_transaction_object</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base2</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">deep_transaction_object2</span><span class="special">;</span>
<span class="special">}}</span>
</pre>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___" title="Template
- Class transaction_object<>">Template
- Class <code class="computeroutput"><span class="identifier">transaction_object</span><span class="special"><></span></code></a>
-</h6></div></div></div>
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___" title="Template
+ Class deep_transaction_object<>">Template
+ Class <code class="computeroutput"><span class="identifier">deep_transaction_object</span><span class="special"><></span></code></a>
+</h5></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__clone___">Virtual
- function <code class="computeroutput"><span class="identifier">clone</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__copy_state___">Virtual
- function <code class="computeroutput"><span class="identifier">copy_state</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__move_state___">Virtual
- function <code class="computeroutput"><span class="identifier">move_state</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__cache_deallocate___">Virtual
- function <code class="computeroutput"><span class="identifier">cache_deallocate</span><span class="special">()</span></code></a></span></dt>
-</dl></div>
-<p>
- To further simplify the usage of TBoost.STM, an intermediate template
- class was built which is meant to sit between the base_transaction_object
- and the user-defined transaction objects. The purpose of this intermediate
- class is to reduce the code overhead needed for user-defined transaction
- objects. To do this, the curiously recurring template pattern developed
- by James Coplien was used.
- </p>
-<p>
- With the templatized transaction_object, client-side transaction
- objects need only to derive from it and pass their class type as
- its template parameter. At compile-time the transaction_object generates
- the necessary code to override copy_state() and implement operator
- new and operator delete using TBoost.STM's memory manager for all
- user-defined types derived from it.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">transaction_object</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">base_transaction_object</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
-
- <span class="keyword">virtual</span> <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">clone</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">*</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">copy_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">move_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.static_member_function__make_cache_final_const__rhs__">Static
+ Member Function <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">Final</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.member_function__make_cache___">Member
+ Function <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.member_function__copy_cache___">Member
+ function <code class="computeroutput"><span class="identifier">copy_cache</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.virtual_function__delete_cache___">Virtual
+ function <code class="computeroutput"><span class="identifier">delete_cache</span><span class="special">()</span></code></a></span></dt>
+</dl></div>
+<p>
+ To further simplify the usage of TBoost.STM, an intermediate template
+ class was built which is meant to sit between the <code class="computeroutput"><span class="identifier">base_transaction_object</span></code>
+ and the user-defined transaction objects. The purpose of this intermediate
+ class is to reduce the code overhead needed for user-defined transaction
+ objects. To do this, the curiously recurring template pattern developed
+ by James Coplien was used.
+ </p>
+<p>
+ With the templatized <code class="computeroutput"><span class="identifier">deep_transaction_object</span></code>,
+ client-side transaction objects need only to derive from it and pass
+ their class type as its template parameter. At compile-time the deep_transaction_object
+ generates the necessary code to override all the virtual functions and
+ efine the static function <code class="computeroutput"><span class="identifier">make_ache</span><span class="special">()</span></code> and implement operator <code class="computeroutput"><span class="keyword">new</span></code> and operator <code class="computeroutput"><span class="keyword">delete</span></code>
+ using TBoost.STM's memory manager for all user-defined types derived
+ from it.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base</span><span class="special">></span>
+<span class="keyword">class</span> <span class="identifier">deep_transaction_object</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">base_transaction_object</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">static</span> <span class="identifier">Final</span><span class="special">*</span> <span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">Final</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">,</span> <span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">void</span> <span class="identifier">delete_cache</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">copy_cache</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span><span class="identifier">rhs</span><span class="special">);</span>
<span class="special">};</span>
</pre>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__clone___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__clone___" title="Virtual
- function clone()">Virtual
- function <code class="computeroutput"><span class="identifier">clone</span><span class="special">()</span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">clone</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">*</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-</pre>
-<p>
- The clone() creates a new Derived instace using the copy constructor.
- </p>
+<a name="toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.static_member_function__make_cache_final_const__rhs__"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.static_member_function__make_cache_final_const__rhs__" title="Static
+ Member Function make_cache(Final const& rhs)">Static
+ Member Function <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">Final</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">)</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="keyword">virtual</span> <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">*</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<p>
+ The <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code>
+ creates a new <code class="computeroutput"><span class="identifier">Final</span></code>
+ instace using the copy constructor cloning <code class="computeroutput"><span class="identifier">rhs</span></code>.
+ </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__copy_state___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__copy_state___" title="Virtual
- function copy_state()">Virtual
- function <code class="computeroutput"><span class="identifier">copy_state</span><span class="special">()</span></code></a>
+<a name="toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.member_function__make_cache___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.member_function__make_cache___" title="Member
+ Function make_cache()">Member
+ Function <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">copy_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">rhs</span><span class="special">);</span>
+<pre class="programlisting"><span class="keyword">virtual</span> <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">*</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
- The copy_state() assigns the rhs to this instace using the copy-assignement
- operator.
- </p>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__move_state___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__move_state___" title="Virtual
- function move_state()">Virtual
- function <code class="computeroutput"><span class="identifier">move_state</span><span class="special">()</span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">move_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
+ The <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code>
+ creates a new <code class="computeroutput"><span class="identifier">Final</span></code>
+ instace using the copy constructor cloning <code class="computeroutput"><span class="keyword">this</span></code>.
+ </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__cache_deallocate___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__transaction_object___.virtual_function__cache_deallocate___" title="Virtual
- function cache_deallocate()">Virtual
- function <code class="computeroutput"><span class="identifier">cache_deallocate</span><span class="special">()</span></code></a>
+<a name="toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.member_function__copy_cache___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.member_function__copy_cache___" title="Member
+ function copy_cache()">Member
+ function <code class="computeroutput"><span class="identifier">copy_cache</span><span class="special">()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">cache_deallocate</span><span class="special">();</span>
+<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">copy_cache</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
- The cache_deallocate() delete this instace using the delete operator.
- </p>
-</div>
+ The <code class="computeroutput"><span class="identifier">copy_cache</span><span class="special">()</span></code>
+ assigns an incomplete smart cast of <code class="computeroutput"><span class="identifier">rhs</span></code>
+ to <code class="computeroutput"><span class="keyword">this</span></code> instance using
+ the copy-assignement operator.
+ </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__native_trans___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_hpp.template_class__native_trans___" title="Template
- Class native_trans<>">Template
- Class <code class="computeroutput"><span class="identifier">native_trans</span><span class="special"><></span></code></a>
+<a name="toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.virtual_function__delete_cache___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.deep_transaction_object_hpp.template_class__deep_transaction_object___.virtual_function__delete_cache___" title="Virtual
+ function delete_cache()">Virtual
+ function <code class="computeroutput"><span class="identifier">delete_cache</span><span class="special">()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">native_trans</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">transaction_object</span><span class="special"><</span> <span class="identifier">native_trans</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">native_trans</span><span class="special">(){}</span>
- <span class="identifier">native_trans</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
- <span class="identifier">native_trans</span><span class="special">(</span><span class="identifier">native_trans</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
- <span class="identifier">native_trans</span><span class="special">(</span><span class="identifier">native_trans</span> <span class="special">&&</span><span class="identifier">rhs</span><span class="special">);</span>
- <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">native_trans</span> <span class="special">&&</span><span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">--();</span>
- <span class="identifier">native_trans</span> <span class="keyword">operator</span><span class="special">--(</span><span class="keyword">int</span><span class="special">);</span>
- <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">++();</span>
- <span class="identifier">native_trans</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
- <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">+=(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
- <span class="identifier">native_trans</span> <span class="keyword">operator</span><span class="special">+(</span><span class="identifier">native_trans</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
-
- <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="identifier">T</span><span class="special">&</span> <span class="identifier">value</span><span class="special">();</span>
- <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">value</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="special">};</span>
+<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">delete_cache</span><span class="special">();</span>
</pre>
+<p>
+ The <code class="computeroutput"><span class="identifier">delete_cache</span><span class="special">()</span></code>
+ deletes this instace using the <code class="computeroutput"><span class="keyword">delete</span></code>
+ operator.
+ </p>
</div>
</div>
-<div class="section" lang="en"><div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_ptr_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.transaction_object_ptr_hpp" title="
- Header <boost/stm/transaction_object_ptr.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transaction_object_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h6></div></div></div></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_numeric_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_numeric_hpp" title="
- Header <boost/stm/tx/numeric.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h6></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_numeric_hpp.template_class__tx__numeric___">Template
- Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">numeric</span><span class="special"><></span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tx</span> <span class="special">{</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">numeric</span><span class="special">;</span>
-
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">bool</span><span class="special">></span> <span class="identifier">boolean</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">char</span><span class="special">></span> <span class="identifier">char_t</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">uchar_t</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">short</span><span class="special">></span> <span class="identifier">short_t</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">short</span><span class="special">></span> <span class="identifier">ushort_t</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">int_t</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">uint_t</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">long</span><span class="special">></span> <span class="identifier">long_t</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">></span> <span class="identifier">ulong_t</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">float_t</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">numeric</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">double_t</span><span class="special">;</span>
-
-<span class="special">}}}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_numeric_hpp.template_class__tx__numeric___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_numeric_hpp.template_class__tx__numeric___" title="Template
- Class tx::numeric<>">Template
- Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">numeric</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">numeric</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">transaction_object</span><span class="special"><</span> <span class="identifier">numeric</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span>
-<span class="special">{</span>
-<span class="keyword">protected</span><span class="special">:</span>
- <span class="identifier">T</span> <span class="identifier">val_</span><span class="special">;</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">numeric</span><span class="special">();</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span> <span class="identifier">numeric</span><span class="special">(</span><span class="identifier">numeric</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">u</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span> <span class="identifier">numeric</span><span class="special">(</span><span class="identifier">U</span> <span class="identifier">v</span><span class="special">);</span>
-
- <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">&();</span>
-
- <span class="identifier">T</span><span class="special">&</span> <span class="identifier">ref</span><span class="special">();</span>
- <span class="identifier">T</span> <span class="identifier">value</span><span class="special">();</span>
-
-<span class="special">};</span>
-</pre>
-</div>
</div>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_pointer_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_pointer_hpp" title="
- Header <boost/stm/tx/pointer.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h6></div></div></div>
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp" title="
+ Header <boost/stm/shallow_transaction_object.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">shallow_transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_pointer_hpp.template_class__tx__pointer___">Template
- Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_pointer_hpp.template_class__tx__pointer_to_member___">Template
- Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer_to_member</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.class__shallow_t_">Class
+ <code class="computeroutput"><span class="identifier">shallow_t</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.constant__shallow_">Constant
+ <code class="computeroutput"><span class="identifier">shallow</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__has_shallow_copy_semantics___">Template
+ Class <code class="computeroutput"><span class="identifier">has_shallow_copy_semantics</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___">Template
+ Class <code class="computeroutput"><span class="identifier">shallow_transaction_object</span><span class="special"><></span></code></a></span></dt>
</dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">tx</span> <span class="special">{</span>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span>
+ <span class="keyword">struct</span> <span class="identifier">shallow_t</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">shallow_t</span> <span class="identifier">shallow</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">pointer</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">C</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">R</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">pointer_to_member</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
+ <span class="keyword">struct</span> <span class="identifier">has_shallow_copy_semantics</span> <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span>
+ <span class="special">{};</span>
-<span class="special">}}}</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base</span><span class="special">=</span><span class="identifier">base_transaction_object</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">shallow_transaction_object</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base2</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">shallow_transaction_object2</span><span class="special">;</span>
+<span class="special">}}</span>
</pre>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_pointer_hpp.template_class__tx__pointer___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_pointer_hpp.template_class__tx__pointer___" title="Template
- Class tx::pointer<>">Template
- Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">pointer</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">transaction_object</span><span class="special"><</span> <span class="identifier">pointer</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span>
-<span class="special">{</span>
-<span class="keyword">protected</span><span class="special">:</span>
- <span class="identifier">T</span><span class="special">*</span> <span class="identifier">val_</span><span class="special">;</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">pointer</span><span class="special">();</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">U</span><span class="special">></span> <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">pointer</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span> <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">U</span><span class="special">*</span> <span class="identifier">v</span><span class="special">);</span>
- <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">v</span><span class="special">);</span>
- <span class="special">~</span><span class="identifier">pointer</span><span class="special">()</span> <span class="special">{}</span>
-
- <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">*&();</span>
-
- <span class="identifier">T</span><span class="special">*&</span> <span class="identifier">get</span><span class="special">();</span>
- <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">*</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="identifier">T</span> <span class="special">*</span> <span class="keyword">operator</span><span class="special">->();</span>
- <span class="identifier">T</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">*();</span>
-<span class="special">};</span>
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.class__shallow_t_"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.class__shallow_t_" title="Class
+ shallow_t">Class
+ <code class="computeroutput"><span class="identifier">shallow_t</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">shallow_t</span> <span class="special">{};</span>
</pre>
-</div>
-<div class="section" lang="en"><div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_pointer_hpp.template_class__tx__pointer_to_member___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.deep_copy.tx_pointer_hpp.template_class__tx__pointer_to_member___" title="Template
- Class tx::pointer_to_member<>">Template
- Class <code class="computeroutput"><span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer_to_member</span><span class="special"><></span></code></a>
-</h6></div></div></div></div>
-</div>
+<p>
+ Shallow type tag to make a difference between the standard copy constructor
+ and the shallow copy constructor.
+ </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.shallow_copy"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy" title="Shallow
- Copy">Shallow
- Copy</a>
+<a name="toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.constant__shallow_"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.constant__shallow_" title="Constant
+ shallow">Constant
+ <code class="computeroutput"><span class="identifier">shallow</span></code></a>
</h5></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">shallow_transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt></dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp" title="
- Header <boost/stm/shallow_transaction_object.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">shallow_transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h6></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___">Template
- Class <code class="computeroutput"><span class="identifier">shallow_transaction_object</span><span class="special"><></span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base</span><span class="special">=</span><span class="identifier">base_transaction_object</span><span class="special">></span>
- <span class="keyword">class</span> <span class="identifier">shallow_transaction_object</span><span class="special">;</span>
-<span class="special">}}</span>
+<pre class="programlisting"><span class="keyword">const</span> <span class="identifier">shallow_t</span> <span class="identifier">shallow</span> <span class="special">=</span> <span class="special">{};</span>
</pre>
+</div>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___" title="Template
- Class shallow_transaction_object<>">Template
- Class <code class="computeroutput"><span class="identifier">shallow_transaction_object</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__clone___">Virtual
- function <code class="computeroutput"><span class="identifier">clone</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__copy_state___">Virtual
- function <code class="computeroutput"><span class="identifier">copy_state</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__move_state___">Virtual
- function <code class="computeroutput"><span class="identifier">move_state</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__cache_deallocate___">Virtual
- function <code class="computeroutput"><span class="identifier">cache_deallocate</span><span class="special">()</span></code></a></span></dt>
-</dl></div>
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__has_shallow_copy_semantics___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__has_shallow_copy_semantics___" title="Template
+ Class has_shallow_copy_semantics<>">Template
+ Class <code class="computeroutput"><span class="identifier">has_shallow_copy_semantics</span><span class="special"><></span></code></a>
+</h5></div></div></div>
<p>
- To further simplify the usage of TBoost.STM, an intermediate template
- class was built which is meant to sit between the base_transaction_object
- and the user-defined transaction objects. The purpose of this intermediate
- class is to reduce the code overhead needed for user-defined transaction
- objects. To do this, the curiously recurring template pattern developed
- by James Coplien was used.
- </p>
-<p>
- With the templatized <code class="computeroutput"><span class="identifier">shallow_transaction_object</span></code>,
- client-side transaction objects need only to derive from it and pass
- their class type as its template parameter. At compile-time the transaction_object
- generates the necessary code to override copy_state() and implement
- operator new and operator delete using TBoost.STM's memory manager
- for all user-defined types derived from it.
- </p>
+ Has shallow copy semantic traits. By default it is false. The user need
+ to specialize this class if STM should take advantage of the shallow
+ copy semantics.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___" title="Template
+ Class shallow_transaction_object<>">Template
+ Class <code class="computeroutput"><span class="identifier">shallow_transaction_object</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.static_member_function__make_cache_final_const__rhs__">Static
+ Member Function <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">Final</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">)</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__make_cache___">Virtual
+ function <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__copy_cache___">Virtual
+ function <code class="computeroutput"><span class="identifier">copy_cache</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__delete_cache___">Virtual
+ function <code class="computeroutput"><span class="identifier">delete_cache</span><span class="special">()</span></code></a></span></dt>
+</dl></div>
+<p>
+ To further simplify the usage of TBoost.STM, an intermediate template
+ class was built which is meant to sit between the <code class="computeroutput"><span class="identifier">base_transaction_object</span></code>
+ and the user-defined transaction objects. The purpose of this intermediate
+ class is to reduce the code overhead needed for user-defined transaction
+ objects. To do this, the curiously recurring template pattern developed
+ by James Coplien was used.
+ </p>
+<p>
+ With the templatized <code class="computeroutput"><span class="identifier">deep_transaction_object</span></code>,
+ client-side transaction objects need only to derive from it and pass
+ their class type as its template parameter. At compile-time the deep_transaction_object
+ generates the necessary code to override all the virtual functions and
+ efine the static function <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code> and implement operator <code class="computeroutput"><span class="keyword">new</span></code> and operator <code class="computeroutput"><span class="keyword">delete</span></code>
+ using TBoost.STM's memory manager for all user-defined types derived
+ from it.
+ </p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Derived</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Base</span><span class="special">=</span><span class="identifier">base_transaction_object</span><span class="special">></span>
<span class="keyword">class</span> <span class="identifier">shallow_transaction_object</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">base_transaction_object</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
-
- <span class="keyword">virtual</span> <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">clone</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">*</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">cache_deallocate</span><span class="special">();</span>
-
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">copy_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">move_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">static</span> <span class="identifier">Final</span><span class="special">*</span> <span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">Final</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">rhs</span><span class="special">,</span> <span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">void</span> <span class="identifier">delete_cache</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">copy_cache</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span><span class="identifier">rhs</span><span class="special">);</span>
<span class="special">};</span>
</pre>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__clone___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__clone___" title="Virtual
- function clone()">Virtual
- function <code class="computeroutput"><span class="identifier">clone</span><span class="special">()</span></code></a>
+<a name="toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.static_member_function__make_cache_final_const__rhs__"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.static_member_function__make_cache_final_const__rhs__" title="Static
+ Member Function make_cache(Final const& rhs)">Static
+ Member Function <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">Final</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">)</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">clone</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">*</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">virtual</span> <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">*</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
- The clone() method calls to the free function cache_new_copy which
- allocates enough memory for the new object and then do a memcpy
- by default.
- </p>
+ The <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code>
+ creates a new <code class="computeroutput"><span class="identifier">Final</span></code>
+ instace using the shallow copy constructor cloning <code class="computeroutput"><span class="identifier">rhs</span></code>.
+ The <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code>
+ method calls to the free function <code class="computeroutput"><span class="identifier">cache_allocate</span></code>
+ which allocates enough memory for the new object and then do a shallow
+ copy.
+ </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__copy_state___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__copy_state___" title="Virtual
- function copy_state()">Virtual
- function <code class="computeroutput"><span class="identifier">copy_state</span><span class="special">()</span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">copy_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">rhs</span><span class="special">);</span>
+<a name="toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__make_cache___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__make_cache___" title="Virtual
+ function make_cache()">Virtual
+ function <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="keyword">virtual</span> <span class="identifier">base_transaction_object</span><span class="special">*</span> <span class="identifier">make_cache</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">*</span> <span class="identifier">t</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
- The copy_state() method call to the free function cache_copy which
- do a memcpy by default.
- </p>
+ The <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code>
+ creates a new <code class="computeroutput"><span class="identifier">Final</span></code>
+ instace using the shallow copy constructor cloning <code class="computeroutput"><span class="keyword">this</span></code>.
+ The <code class="computeroutput"><span class="identifier">make_cache</span><span class="special">()</span></code>
+ method calls to the free function <code class="computeroutput"><span class="identifier">cache_allocate</span></code>
+ which allocates enough memory for the new object and then do a shallow
+ copy.
+ </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__move_state___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__move_state___" title="Virtual
- function move_state()">Virtual
- function <code class="computeroutput"><span class="identifier">move_state</span><span class="special">()</span></code></a>
+<a name="toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__copy_cache___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__copy_cache___" title="Virtual
+ function copy_cache()">Virtual
+ function <code class="computeroutput"><span class="identifier">copy_cache</span><span class="special">()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">move_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
+<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">copy_cache</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">rhs</span><span class="special">);</span>
</pre>
<p>
- The move_state() method call to the free function cache_copy which
- do a memcpy by default.
- </p>
+ The <code class="computeroutput"><span class="identifier">copy_cache</span><span class="special">()</span></code>
+ method do a shallow assignement from an incomplete smart cast of <code class="computeroutput"><span class="identifier">rhs</span></code> to the final instance associated
+ to <code class="computeroutput"><span class="keyword">this</span></code>.
+ </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__cache_deallocate___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.shallow_copy.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__cache_deallocate___" title="Virtual
- function cache_deallocate()">Virtual
- function <code class="computeroutput"><span class="identifier">cache_deallocate</span><span class="special">()</span></code></a>
+<a name="toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__delete_cache___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.shallow_transaction_object_hpp.template_class__shallow_transaction_object___.virtual_function__delete_cache___" title="Virtual
+ function delete_cache()">Virtual
+ function <code class="computeroutput"><span class="identifier">delete_cache</span><span class="special">()</span></code></a>
</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">cache_deallocate</span><span class="special">();</span>
+<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">delete_cache</span><span class="special">();</span>
</pre>
<p>
- The cache_deallocate() method call to the free function cache_deallocate
- which do a memcpy by default.
- </p>
-</div>
+ The <code class="computeroutput"><span class="identifier">delete_cache</span><span class="special">()</span></code>
+ method deallowates this instance using the free function <code class="computeroutput"><span class="identifier">cache_deallocate</span></code>.
+ </p>
+<p>
+ Note that the object is not destructed, as the cache instance is not
+ see as a real instance.
+ </p>
</div>
</div>
</div>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.smart_pointers"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.smart_pointers" title="Smart
- pointers">Smart
- pointers</a>
-</h5></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.smart_pointers.txs_ptr_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt></dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.smart_pointers.txs_ptr_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.smart_pointers.txs_ptr_hpp" title="
- Header <boost/stm/tx_ptr.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h6></div></div></div>
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.transaction_object_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp" title="
+ Header <boost/stm/transaction_object.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transaction_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.smart_pointers.txs_ptr_hpp.template_class__read_ptr___">Template
- Class <code class="computeroutput"><span class="identifier">read_ptr</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.smart_pointers.txs_ptr_hpp.template_class__write_ptr___">Template
- Class <code class="computeroutput"><span class="identifier">write_ptr</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__virtually___">Template
+ Class <code class="computeroutput"><span class="identifier">virtually</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__transaction_object___">Template
+ Class <code class="computeroutput"><span class="identifier">transaction_object</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__native_trans___">Template
+ Class <code class="computeroutput"><span class="identifier">native_trans</span><span class="special"><></span></code></a></span></dt>
</dl></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">read_ptr</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">write_ptr</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">B</span><span class="special">></span> <span class="keyword">struct</span> <span class="identifier">virtually</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Base</span><span class="special">=</span><span class="identifier">base_transaction_object</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">transaction_object</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Base1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Base2</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">transaction_object2</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">native_trans</span><span class="special">;</span>
<span class="special">}}</span>
</pre>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.smart_pointers.txs_ptr_hpp.template_class__read_ptr___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.smart_pointers.txs_ptr_hpp.template_class__read_ptr___" title="Template
- Class read_ptr<>">Template
- Class <code class="computeroutput"><span class="identifier">read_ptr</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">read_ptr</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">inline</span> <span class="identifier">read_ptr</span><span class="special">(</span><span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">tx_obj</span><span class="special">);</span>
- <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">inline</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">inline</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="keyword">inline</span> <span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">trans</span><span class="special">();</span>
- <span class="identifier">T</span><span class="special">*</span> <span class="identifier">write_ptr</span><span class="special">();</span>
-<span class="special">};</span>
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__virtually___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__virtually___" title="Template
+ Class virtually<>">Template
+ Class <code class="computeroutput"><span class="identifier">virtually</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<p>
+ Virtualy inherits from its template parameter.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">virtually</span> <span class="special">:</span> <span class="keyword">virtual</span> <span class="identifier">B</span> <span class="special">{</span>
+ <span class="comment">// forward constructors
+</span><span class="special">};</span>
</pre>
</div>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.mixins.smart_pointers.txs_ptr_hpp.template_class__write_ptr___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.mixins.smart_pointers.txs_ptr_hpp.template_class__write_ptr___" title="Template
- Class write_ptr<>">Template
- Class <code class="computeroutput"><span class="identifier">write_ptr</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">write_ptr</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">inline</span> <span class="identifier">write_ptr</span><span class="special">(</span><span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">T</span> <span class="special">&</span> <span class="identifier">tx_obj</span><span class="special">);</span>
-
- <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">inline</span> <span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*();</span>
- <span class="keyword">inline</span> <span class="identifier">T</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->();</span>
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__transaction_object___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__transaction_object___" title="Template
+ Class transaction_object<>">Template
+ Class <code class="computeroutput"><span class="identifier">transaction_object</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<p>
+ To further simplify the usage of TBoost.STM, an intermediate template
+ class was built which is meant to sit between the deep_transaction_object
+ or shallow_transaction_object, depending on whether the filanl class
+ has shallow copy semantics, and the user-defined transaction objects.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">detail</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Base</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">hasShallowCopySemantics</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">transaction_object_aux</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">F</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">B</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">transaction_object_aux</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">B</span><span class="special">,</span> <span class="keyword">true</span><span class="special">></span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">shallow_transaction_object</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span> <span class="special">{};</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">F</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">B</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">transaction_object_aux</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">B</span><span class="special">,</span> <span class="keyword">false</span><span class="special">></span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">deep_transaction_object</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span> <span class="special">{};</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Base1</span><span class="special">,</span><span class="keyword">class</span> <span class="identifier">Base2</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">hasShallowCopySemantics</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">transaction_object2_aux</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">F</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">B1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">B2</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">transaction_object2_aux</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">B1</span><span class="special">,</span> <span class="identifier">B2</span><span class="special">,</span> <span class="keyword">true</span><span class="special">></span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">shallow_transaction_object2</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">B1</span><span class="special">,</span> <span class="identifier">B2</span><span class="special">></span> <span class="special">{};</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">F</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">B1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">B2</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">transaction_object2_aux</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">B1</span><span class="special">,</span> <span class="identifier">B2</span><span class="special">,</span> <span class="keyword">false</span><span class="special">></span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">deep_transaction_object2</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">B1</span><span class="special">,</span> <span class="identifier">B2</span><span class="special">></span> <span class="special">{};</span>
+<span class="special">}</span>
+
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Base</span><span class="special">></span>
+<span class="keyword">class</span> <span class="identifier">transaction_object</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">transaction_object_aux</span><span class="special"><</span><span class="identifier">Final</span><span class="special">,</span> <span class="identifier">Base</span><span class="special">,</span> <span class="identifier">has_shallow_copy_semantics</span><span class="special"><</span><span class="identifier">Final</span><span class="special">>::</span><span class="identifier">value</span>
+ <span class="special">></span>
+<span class="special">{};</span>
+
+<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Final</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Base1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Base2</span><span class="special">></span>
+<span class="keyword">class</span> <span class="identifier">transaction_object2</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">transaction_object2_aux</span><span class="special"><</span><span class="identifier">Final</span><span class="special">,</span> <span class="identifier">Base1</span><span class="special">,</span> <span class="identifier">Base2</span><span class="special">,</span> <span class="identifier">has_shallow_copy_semantics</span><span class="special"><</span><span class="identifier">Final</span><span class="special">>::</span><span class="identifier">value</span>
+ <span class="special">></span>
+<span class="special">{};</span>
</pre>
</div>
-</div>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers"></a>Warppers
-</h4></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transactional_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers">Smart
- pointers</a></span></dt>
-</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp" title="
- Header <boost/stm/transactional_object.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">transactional_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+<a name="toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__native_trans___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.transaction_object_hpp.template_class__native_trans___" title="Template
+ Class native_trans<>">Template
+ Class <code class="computeroutput"><span class="identifier">native_trans</span><span class="special"><></span></code></a>
</h5></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___">Template
- Class <code class="computeroutput"><span class="identifier">transactional_object</span><span class="special"><></span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">transactional_object</span><span class="special">;</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">>*</span> <span class="identifier">tx_up_cast</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">ptr</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">>*</span> <span class="identifier">tx_static_cast</span><span class="special">(</span><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">U</span><span class="special">>*</span> <span class="identifier">ptr</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">>*</span> <span class="identifier">tx_dynamic_cast</span><span class="special">(</span><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">U</span><span class="special">>*</span> <span class="identifier">ptr</span><span class="special">);</span>
-<span class="special">}}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___" title="Template
- Class transactional_object<>">Template
- Class <code class="computeroutput"><span class="identifier">transactional_object</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___.virtual_function__copy_state___">Virtual
- function <code class="computeroutput"><span class="identifier">copy_state</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___.virtual_function__move_state___">Virtual
- function <code class="computeroutput"><span class="identifier">move_state</span><span class="special">()</span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___.virtual_function__cache_deallocate___">Virtual
- function <code class="computeroutput"><span class="identifier">cache_deallocate</span><span class="special">()</span></code></a></span></dt>
-</dl></div>
-<p>
- Transactional object wrapper. A <code class="computeroutput"><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></code> is a base_transaction_object wrapping
- an instance of type T. Provides the definition of the virtual functions
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- forward constructors to the wrapped type
- </li>
-<li>
-<code class="computeroutput"><span class="identifier">copy_state</span></code>: relaying
- on the cache_copy<T> generic function
- </li>
-<li>
-<code class="computeroutput"><span class="identifier">move_state</span></code> and
- </li>
-<li>
-<code class="computeroutput"><span class="identifier">cache_deallocate</span></code>:
- relaying on the cache_copy<T> generic function
- </li>
-</ul></div>
-<p>
- Defines in addition the functions <code class="computeroutput"><span class="keyword">new</span></code>
- and <code class="computeroutput"><span class="keyword">delete</span></code> when <code class="computeroutput"><span class="identifier">BOOST_STM_USE_MEMORY_MANAGER</span></code> is defined
- </p>
-<p>
- If a class D inherits from B we have that <code class="computeroutput"><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">D</span><span class="special">></span></code> dont inherits from <code class="computeroutput"><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">B</span><span class="special">></span></code>,
- but we can static/dynamic cast them robustly.
- </p>
-<p>
- Evidently the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="keyword">static_cast</span></code>/<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="keyword">dynamic_cast</span></code>
- do not works. We need to define the specific cast
- </p>
-<pre class="programlisting"><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">D</span><span class="special">>*</span> <span class="identifier">d</span><span class="special">=...;</span>
-<span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">B</span><span class="special">>*</span> <span class="identifier">b</span><span class="special">=</span><span class="identifier">tx_static_cast</span><span class="special"><</span><span class="identifier">B</span><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
-
-<span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">B</span><span class="special">>*</span> <span class="identifier">b</span><span class="special">=...;</span>
-<span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">D</span><span class="special">>*</span> <span class="identifier">d</span><span class="special">=</span><span class="identifier">tx_dynamic_cast</span><span class="special"><</span><span class="identifier">B</span><span class="special">>(</span><span class="identifier">b</span><span class="special">);</span>
-</pre>
-<p>
- Synopsis
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">transactional_object</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">base_transaction_object</span> <span class="special">{</span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">native_trans</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">transaction_object</span><span class="special"><</span> <span class="identifier">native_trans</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">T</span> <span class="identifier">value</span><span class="special">;</span>
-
- <span class="identifier">transactional_object</span><span class="special">();</span>
- <span class="identifier">transactional_object</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span><span class="identifier">ptr</span><span class="special">);</span>
- <span class="identifier">transactional_object</span><span class="special">(</span><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">></span>
- <span class="identifier">transactional_object</span><span class="special">(</span><span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">p1</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">></span>
- <span class="identifier">transactional_object</span><span class="special">(</span><span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">p1</span><span class="special">,</span> <span class="identifier">T2</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">p2</span><span class="special">);</span>
-
- <span class="identifier">transactional_object</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">transactional_object</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
-
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">copy_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">rhs</span><span class="special">);</span>
+ <span class="identifier">native_trans</span><span class="special">(){}</span>
+ <span class="identifier">native_trans</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
+ <span class="identifier">native_trans</span><span class="special">(</span><span class="identifier">native_trans</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
+ <span class="identifier">native_trans</span><span class="special">(</span><span class="identifier">native_trans</span> <span class="special">&&</span><span class="identifier">rhs</span><span class="special">);</span>
+ <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">native_trans</span> <span class="special">&&</span><span class="identifier">rhs</span><span class="special">);</span>
-<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_STM_USE_UNASIGNED_COPY</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">cache_deallocate</span><span class="special">();</span>
-<span class="preprocessor">#endif</span>
+ <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
-<span class="preprocessor">#if</span> <span class="identifier">BOST_STM_USE_MEMORY_MANAGER</span>
- <span class="keyword">void</span><span class="special">*</span> <span class="keyword">operator</span> <span class="keyword">new</span><span class="special">(</span><span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">)</span> <span class="keyword">throw</span> <span class="special">();</span>
- <span class="keyword">void</span> <span class="keyword">operator</span> <span class="keyword">delete</span><span class="special">(</span><span class="keyword">void</span><span class="special">*</span> <span class="identifier">mem</span><span class="special">);</span>
-<span class="preprocessor">#endif</span>
+ <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">--();</span>
+ <span class="identifier">native_trans</span> <span class="keyword">operator</span><span class="special">--(</span><span class="keyword">int</span><span class="special">);</span>
+ <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">++();</span>
+ <span class="identifier">native_trans</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
+ <span class="identifier">native_trans</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">+=(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
+ <span class="identifier">native_trans</span> <span class="keyword">operator</span><span class="special">+(</span><span class="identifier">native_trans</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
+ <span class="keyword">operator</span> <span class="identifier">T</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">T</span><span class="special">&</span> <span class="identifier">value</span><span class="special">();</span>
+ <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">value</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">};</span>
</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___.virtual_function__copy_state___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___.virtual_function__copy_state___" title="Virtual
- function copy_state()">Virtual
- function <code class="computeroutput"><span class="identifier">copy_state</span><span class="special">()</span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">copy_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___.virtual_function__move_state___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___.virtual_function__move_state___" title="Virtual
- function move_state()">Virtual
- function <code class="computeroutput"><span class="identifier">move_state</span><span class="special">()</span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">move_state</span><span class="special">(</span><span class="identifier">base_transaction_object</span> <span class="special">*</span> <span class="identifier">rhs</span><span class="special">);</span>
-</pre>
</div>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___.virtual_function__cache_deallocate___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.transactional_object_hpp.template_class__transactional_object___.virtual_function__cache_deallocate___" title="Virtual
- function cache_deallocate()">Virtual
- function <code class="computeroutput"><span class="identifier">cache_deallocate</span><span class="special">()</span></code></a>
-</h6></div></div></div>
-<pre class="programlisting"><span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">cache_deallocate</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
-</pre>
-</div>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.smart_pointers"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers" title="Smart
- pointers">Smart
- pointers</a>
-</h5></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">smart_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt></dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp" title="
- Header <boost/stm/tx/smart_ptr.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx</span><span class="special">/</span><span class="identifier">smart_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h6></div></div></div>
+<div class="titlepage"><div><div><h4 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.txs_ptr_hpp"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.txs_ptr_hpp" title="
+ Header <boost/stm/tx_ptr.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">/</span><span class="identifier">tx_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__tx_obj___">Template
- Class <code class="computeroutput"><span class="identifier">tx_obj</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__tx_ptr___">Template
- Class <code class="computeroutput"><span class="identifier">tx_ptr</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__rd_ptr___">Template
- Class <code class="computeroutput"><span class="identifier">rd_ptr</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__upgrd_ptr___">Template
- Class <code class="computeroutput"><span class="identifier">upgrd_ptr</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__wr_ptr___">Template
- Class <code class="computeroutput"><span class="identifier">wr_ptr</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.txs_ptr_hpp.template_class__read_ptr___">Template
+ Class <code class="computeroutput"><span class="identifier">read_ptr</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section"><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.txs_ptr_hpp.template_class__write_ptr___">Template
+ Class <code class="computeroutput"><span class="identifier">write_ptr</span><span class="special"><></span></code></a></span></dt>
</dl></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">stm</span> <span class="special">{</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">tx_obj</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">U</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">U</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">U</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">U</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">U</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">inline</span> <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">&</span> <span class="identifier">b</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">tx_ptr</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">U</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">U</span><span class="special">>&</span> <span class="identifier">rhs</span><span class="special">);</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">inline</span> <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">&</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">&</span> <span class="identifier">b</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="keyword">void</span> <span class="identifier">delete_ptr</span><span class="special">(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="keyword">void</span> <span class="identifier">delete_ptr</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">tx</span><span class="special">,</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">ptr</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">tx_static_cast</span><span class="special">(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">>*</span> <span class="identifier">tx_dynamic_cast</span><span class="special">(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="identifier">ptr</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">rd_ptr</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="identifier">rd_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">make_rd_ptr</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">tx</span><span class="special">,</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="identifier">rd_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">make_rd_ptr</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">tx</span><span class="special">,</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">ref</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="identifier">rd_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">make_rd_ptr</span><span class="special">(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="identifier">rd_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">make_rd_ptr</span><span class="special">(</span><span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">ref</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="keyword">void</span> <span class="identifier">delete_ptr</span><span class="special">(</span><span class="identifier">rd_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="keyword">void</span> <span class="identifier">delete_ptr</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">tx</span><span class="special">,</span> <span class="identifier">rd_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">ptr</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">upgrd_ptr</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="keyword">void</span> <span class="identifier">delete_ptr</span><span class="special">(</span><span class="identifier">upgrd_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="keyword">void</span> <span class="identifier">delete_ptr</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">tx</span><span class="special">,</span> <span class="identifier">upgrd_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">ptr</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">wr_ptr</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="identifier">wr_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">make_wr_ptr</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">tx</span><span class="special">,</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="identifier">wr_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">make_wr_ptr</span><span class="special">(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="keyword">void</span> <span class="identifier">delete_ptr</span><span class="special">(</span><span class="identifier">wr_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
- <span class="keyword">void</span> <span class="identifier">delete_ptr</span><span class="special">(</span><span class="identifier">transaction</span><span class="special">&</span> <span class="identifier">tx</span><span class="special">,</span> <span class="identifier">wr_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">ptr</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">read_ptr</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">write_ptr</span><span class="special">;</span>
<span class="special">}}</span>
</pre>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__tx_obj___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__tx_obj___" title="Template
- Class tx_obj<>">Template
- Class <code class="computeroutput"><span class="identifier">tx_obj</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<p>
- tx_obj is a kind of smart pointer to a wrapped transactional_object
- T providing builting operators
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">tx_obj</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">tx_obj</span><span class="special">();</span>
- <span class="keyword">template</span><span class="special"><</span><span class="identifier">ctypename</span> <span class="identifier">Y</span><span class="special">></span> <span class="identifier">tx_obj</span><span class="special">(</span><span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">Y</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">></span> <span class="identifier">tx_obj</span><span class="special">(</span><span class="identifier">T1</span> <span class="identifier">p1</span><span class="special">);</span>
-
- <span class="identifier">T</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->();</span>
- <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*();</span>
- <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">();</span>
- <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="identifier">T</span><span class="special">&</span> <span class="identifier">ref</span><span class="special">();</span>
- <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">ref</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="identifier">tx_obj</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">--();</span>
- <span class="identifier">T</span> <span class="keyword">operator</span><span class="special">--(</span><span class="keyword">int</span><span class="special">);</span>
-
- <span class="identifier">tx_obj</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">++();</span>
- <span class="identifier">T</span> <span class="keyword">operator</span><span class="special">++(</span><span class="keyword">int</span><span class="special">);</span>
-
- <span class="identifier">tx_obj</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">+=(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">);</span>
- <span class="identifier">T</span> <span class="keyword">operator</span><span class="special">+(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">rhs</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="special">};</span>
-</pre>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__tx_ptr___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__tx_ptr___" title="Template
- Class tx_ptr<>">Template
- Class <code class="computeroutput"><span class="identifier">tx_ptr</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<p>
- a tx_ptr<T> is an smart pointer to a transactional_object<T>
- (which contains an instance of T). Reference fields in linked structures
- should always be tx_ptrs. The result of derreferencing it will be
- the pointer to the T instance When this pointer is derreference on
- a transaction the transactional_object<T> is set a written
- and the transaction specific storage will be used. Otherwise the
- shared storage is used.
- </p>
-<p>
- Used to initialize a rd_ptr<T>, wr_ptr<T>, or upgrd_ptr<T>.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">tx_ptr</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">typedef</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">this_type</span><span class="special">;</span>
-
- <span class="identifier">tx_ptr</span><span class="special">();</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span> <span class="keyword">explicit</span> <span class="identifier">tx_ptr</span><span class="special">(</span><span class="identifier">Y</span> <span class="special">*</span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">explicit</span> <span class="identifier">tx_ptr</span><span class="special">(</span><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">>*</span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="identifier">tx_ptr</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">>&</span> <span class="identifier">r</span><span class="special">);</span>
-
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span> <span class="identifier">tx_ptr</span><span class="special">(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">Y</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span> <span class="identifier">tx_ptr</span><span class="special">(</span><span class="identifier">rd_ptr</span><span class="special"><</span><span class="identifier">Y</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span> <span class="identifier">tx_ptr</span><span class="special">(</span><span class="identifier">wr_ptr</span><span class="special"><</span><span class="identifier">Y</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span> <span class="identifier">tx_ptr</span><span class="special">(</span><span class="identifier">upgrd_ptr</span><span class="special"><</span><span class="identifier">Y</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
-
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span> <span class="identifier">tx_ptr</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">Y</span><span class="special">>*</span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span> <span class="identifier">tx_ptr</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">Y</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
-
- <span class="identifier">T</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="keyword">typedef</span> <span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">>*</span> <span class="identifier">this_type</span><span class="special">::*</span><span class="identifier">unspecified_bool_type</span><span class="special">;</span>
-
- <span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">tx_ptr</span> <span class="special">&</span> <span class="identifier">other</span><span class="special">);</span>
-<span class="special">};</span>
-</pre>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__rd_ptr___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__rd_ptr___" title="Template
- Class rd_ptr<>">Template
- Class <code class="computeroutput"><span class="identifier">rd_ptr</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<p>
- A rd_ptr<T> ("read pointer") points to an object
- that the current transaction has opened for read only access. You
- can only call a const method through a read pointer.
- </p>
-<p>
- A rd_ptr<T> is constructed from an tx_ptr<T> through
- an explicit constructor. Once a rd_ptr<T> has been constructed,
- an tx_ptr<T> can be opened for reading simply by assignment
- (operator=()) into the constructed rd_ptr<T>.
- </p>
-<p>
- It is not safe to derreference a rd_ptr<T> after having assigned
- the same tx_ptr<T> to a wr_ptr<T>. If this is the case
- the readen value do not match the writen one. If it is possible to
- write on the same transaction use upgrd_ptr instead which is safe.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">rd_ptr</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">rd_ptr</span><span class="special">(</span><span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">tx_obj</span><span class="special">);</span>
- <span class="identifier">rd_ptr</span><span class="special">(</span><span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">tx_obj</span><span class="special">);</span>
-
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span> <span class="identifier">rd_ptr</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">Y</span><span class="special">></span> <span class="identifier">r</span><span class="special">);</span>
-
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span> <span class="identifier">rd_ptr</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">tx_obj</span><span class="special"><</span><span class="identifier">Y</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
-
- <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="keyword">inline</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">inline</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
-<span class="special">};</span>
-</pre>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__upgrd_ptr___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__upgrd_ptr___" title="Template
- Class upgrd_ptr<>">Template
- Class <code class="computeroutput"><span class="identifier">upgrd_ptr</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<p>
- A upgrd_ptr<T> ("upgradable pointer") points to an
- object that the current transaction has opened for read only access.
- </p>
-<p>
- You can only call const method of the wrapped type through a upgradable
- pointer.
- </p>
-<p>
- A upgrd_ptr<T> is constructed from an tx_ptr<T> through
- a constructor having also the transaction as parameter. Once a rd_ptr<T>
- has been constructed, an tx_ptr<T> can be opened for reading
- simply by assignment (operator=()) into the constructed rd_ptr<T>.
- </p>
-<p>
- It is safe to derreference a rd_ptr<T> after having assigned
- the same tx_ptr<T> to a wr_ptr<T>.
- </p>
-<p>
- A upgrd_ptr<T> can be upgraded to a wr_ptr<T> through
- a constructor.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">upgrd_ptr</span> <span class="special">{</span>
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.txs_ptr_hpp.template_class__read_ptr___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.txs_ptr_hpp.template_class__read_ptr___" title="Template
+ Class read_ptr<>">Template
+ Class <code class="computeroutput"><span class="identifier">read_ptr</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">read_ptr</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">inline</span> <span class="identifier">read_ptr</span><span class="special">(</span><span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">tx_obj</span><span class="special">);</span>
+ <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">inline</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">inline</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">inline</span> <span class="identifier">upgrd_ptr</span><span class="special">(</span><span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">tx_obj</span><span class="special">);</span>
- <span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">Y</span><span class="special">></span>
- <span class="identifier">upgrd_ptr</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">Y</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
-
- <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="keyword">inline</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">inline</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">operator</span><span class="special">->()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
- <span class="keyword">void</span> <span class="identifier">write_ptr</span><span class="special">(</span><span class="identifier">transactional_object</span><span class="special"><</span><span class="identifier">T</span><span class="special">>*</span> <span class="identifier">ptr</span><span class="special">);</span>
- <span class="identifier">T</span><span class="special">*</span> <span class="identifier">write_ptr</span><span class="special">();</span>
-
+ <span class="keyword">inline</span> <span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">trans</span><span class="special">();</span>
+ <span class="identifier">T</span><span class="special">*</span> <span class="identifier">write_ptr</span><span class="special">();</span>
<span class="special">};</span>
</pre>
</div>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h6 class="title">
-<a name="toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__wr_ptr___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.warppers.smart_pointers.tx_smart_ptr_hpp.template_class__wr_ptr___" title="Template
- Class wr_ptr<>">Template
- Class <code class="computeroutput"><span class="identifier">wr_ptr</span><span class="special"><></span></code></a>
-</h6></div></div></div>
-<p>
- A wr_ptr<T> ("write pointer") points to a shared
- object that the current transaction has opened for writing.
- </p>
-<p>
- A wr_ptr<T> is initialized explicitly from an tx_ptr<T>.
- </p>
-<p>
- A wr_ptr<T> can also be explicitly constructed from a upgrd_ptr<T>
- as an upgrade-to-writable operation.
- </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
-<span class="keyword">class</span> <span class="identifier">wr_ptr</span> <span class="special">{</span>
+<div class="titlepage"><div><div><h5 class="title">
+<a name="toward_boost_stm.reference.transactional_objects.txs_ptr_hpp.template_class__write_ptr___"></a><a href="transactional_objects.html#toward_boost_stm.reference.transactional_objects.txs_ptr_hpp.template_class__write_ptr___" title="Template
+ Class write_ptr<>">Template
+ Class <code class="computeroutput"><span class="identifier">write_ptr</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">write_ptr</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">wr_ptr</span><span class="special">(</span><span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">tx_obj</span><span class="special">);</span>
-
- <span class="identifier">wr_ptr</span><span class="special">(</span><span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">upgrd_ptr</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">tx_obj</span><span class="special">);</span>
-
- <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">();</span>
-
- <span class="keyword">inline</span> <span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*();</span>
- <span class="keyword">inline</span> <span class="identifier">T</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->();</span>
+ <span class="keyword">inline</span> <span class="identifier">write_ptr</span><span class="special">(</span><span class="identifier">transaction</span> <span class="special">&</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">T</span> <span class="special">&</span> <span class="identifier">tx_obj</span><span class="special">);</span>
- <span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-<span class="special">};</span>
+ <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">inline</span> <span class="identifier">T</span><span class="special">&</span> <span class="keyword">operator</span><span class="special">*();</span>
+ <span class="keyword">inline</span> <span class="identifier">T</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">->();</span>
</pre>
</div>
</div>
</div>
-</div>
-</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2009 Justin E. Gottchlich<br>Copyright © 2009 Vicente J. Botet Escriba<p>
@@ -965,7 +534,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="core.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="non_transactional_objects.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="core.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="built_in_transactional_objects.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/ext_references.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/ext_references.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/ext_references.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -27,7 +27,7 @@
<a name="toward_boost_stm.users_guide.ext_references"></a> References
</h3></div></div></div>
<a name="toward_boost_stm.users_guide.ext_references.tboost_stm_relared"></a><h4>
-<a name="id4828789"></a>
+<a name="id4829196"></a>
<a href="ext_references.html#toward_boost_stm.users_guide.ext_references.tboost_stm_relared">TBoost.STM
relared</a>
</h4>
@@ -155,7 +155,7 @@
</dl>
</div>
<a name="toward_boost_stm.users_guide.ext_references.stm_related"></a><h4>
-<a name="id4829163"></a>
+<a name="id4829571"></a>
<a href="ext_references.html#toward_boost_stm.users_guide.ext_references.stm_related">STM
related</a>
</h4>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/getting_started.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/getting_started.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/getting_started.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -64,7 +64,7 @@
memory!
</p>
<a name="toward_boost_stm.users_guide.getting_started.install.getting_boost_stm"></a><h5>
-<a name="id4814721"></a>
+<a name="id4814747"></a>
<a href="getting_started.html#toward_boost_stm.users_guide.getting_started.install.getting_boost_stm">Getting
Boost.STM</a>
</h5>
@@ -77,11 +77,11 @@
page</a>.
</p>
<p>
- You can also access the latest (unstable?) state from the <a href="https://svn.boost.org/svn/boost/sandbox/stm" target="_top">Boost
+ You can also access the latest (unstable?) state from the <a href="https://svn.boost.org/svn/boost/sandbox/stm/branches/vbe" target="_top">Boost
Sandbox</a>.
</p>
<a name="toward_boost_stm.users_guide.getting_started.install.building_boost_stm"></a><h5>
-<a name="id4814773"></a>
+<a name="id4814800"></a>
<a href="getting_started.html#toward_boost_stm.users_guide.getting_started.install.building_boost_stm">Building
Boost.STM</a>
</h5>
@@ -93,7 +93,7 @@
<span class="identifier">bjam</span>
</pre>
<a name="toward_boost_stm.users_guide.getting_started.install.requirements"></a><h5>
-<a name="id4814835"></a>
+<a name="id4814862"></a>
<a href="getting_started.html#toward_boost_stm.users_guide.getting_started.install.requirements">Requirements</a>
</h5>
<p>
@@ -106,8 +106,7 @@
<p>
In order to be more portable TBoost.STM is migrating to Boost. You should
use either Boost version 1.39.x or the version in SVN trunk (even if Boost
- version 1.35.x should works also). In particular, TBoost.STM will depends
- on:
+ version 1.35.x should works also). In particular, TBoost.STM depends on:
</p>
<div class="variablelist">
<p class="title"><b></b></p>
@@ -129,7 +128,7 @@
</dl>
</div>
<p>
- In addition TBoost.STM will uses the following libraries on the Boost Sandbox
+ In addition TBoost.STM uses the following libraries on the Boost Sandbox
</p>
<div class="variablelist">
<p class="title"><b></b></p>
@@ -164,7 +163,7 @@
</dl>
</div>
<a name="toward_boost_stm.users_guide.getting_started.install.exceptions_safety"></a><h5>
-<a name="id4815100"></a>
+<a name="id4815127"></a>
<a href="getting_started.html#toward_boost_stm.users_guide.getting_started.install.exceptions_safety">Exceptions
safety</a>
</h5>
@@ -173,7 +172,7 @@
of exception safety as long as the underlying parameters provide it.
</p>
<a name="toward_boost_stm.users_guide.getting_started.install.thread_safety"></a><h5>
-<a name="id4815127"></a>
+<a name="id4815153"></a>
<a href="getting_started.html#toward_boost_stm.users_guide.getting_started.install.thread_safety">Thread
safety</a>
</h5>
@@ -181,7 +180,7 @@
All functions in the library are thread-unsafe except when noted explicitly.
</p>
<a name="toward_boost_stm.users_guide.getting_started.install.tested_compilers"></a><h5>
-<a name="id4815152"></a>
+<a name="id4815178"></a>
<a href="getting_started.html#toward_boost_stm.users_guide.getting_started.install.tested_compilers">Tested
compilers</a>
</h5>
@@ -218,27 +217,25 @@
The below example gives a basic introduction into TBoost.STM's transactional
framework and demonstrates TBoost.STM's ACI conformance.
</p>
-<pre class="programlisting"><span class="identifier">tx_obj</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">counter</span><span class="special">;</span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="identifier">Boost</span><span class="special">::</span><span class="identifier">stm</span><span class="special">::</span><span class="identifier">tx</span><span class="special">::</span><span class="identifier">object</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">counter</span><span class="special">(</span><span class="number">0</span><span class="special">);</span>
<span class="keyword">int</span> <span class="identifier">increment</span><span class="special">()</span> <span class="special">{</span>
- <span class="keyword">int</span> <span class="identifier">val</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
- <span class="identifier">use_atomic</span><span class="special">(</span><span class="identifier">_</span><span class="special">)</span> <span class="special">{</span>
- <span class="special">(*</span><span class="identifier">counter</span><span class="special">)++;</span>
- <span class="identifier">val</span> <span class="special">=</span> <span class="special">*</span><span class="identifier">counter</span><span class="special">;</span>
- <span class="special">}</span>
- <span class="keyword">return</span> <span class="identifier">val</span><span class="special">;</span>
+ <span class="identifier">BOOST_STM_TRANSACTION</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">counter</span><span class="special">++;</span>
+ <span class="special">}</span> <span class="identifier">BOOST_STM_TRANSACTION</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
- In the above example, (A) both the write on counter and the read operations
- function atomically or neither operations are performed. In addition, (C)
- the transaction begins and ends in legal memory states, meaning global
- int is guaranteed to be read correctly, preventing thread data races from
- causing inconsistent results. Lastly, (I) the intermediate state of the
- incremented global int is isolated until the transaction commits. These
- three attributes fulfill TBoost.STM's conformance to the ACI principles.
- The above example also gives a basic introduction into TBoost.STM's transactional
- framework.
+ In the above example, (A) both the write on <code class="computeroutput"><span class="identifier">counter</span></code>
+ and the read operations function atomically or neither operations are performed.
+ In addition, (C) the transaction begins and ends in legal memory states,
+ meaning <code class="computeroutput"><span class="identifier">counter</span></code> is guaranteed
+ to be read correctly, preventing thread data races from causing inconsistent
+ results. Lastly, (I) the intermediate state of the incremented <code class="computeroutput"><span class="identifier">counter</span></code> is isolated until the transaction
+ commits. These three attributes fulfill TBoost.STM's conformance to the
+ ACI principles. The above example also gives a basic introduction into
+ TBoost.STM's transactional framework.
</p>
</div>
</div>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/tutorial.html
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/tutorial.html (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/html/toward_boost_stm/users_guide/tutorial.html 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -81,16 +81,16 @@
calls.
</p>
<a name="toward_boost_stm.users_guide.tutorial.a_simple_transaction.client_invoked_inserts"></a><h5>
-<a name="id4815470"></a>
+<a name="id4815527"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.a_simple_transaction.client_invoked_inserts">Client
Invoked Inserts</a>
</h5>
<pre class="programlisting"><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">linked_list</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="identifier">llist</span><span class="special">;</span>
<span class="special">...</span>
<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special"><</span> <span class="number">100</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">use_atomic</span><span class="special">(</span><span class="identifier">_</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">BOOST_STM_TRANSACTION</span> <span class="special">{</span>
<span class="identifier">llist</span><span class="special">-></span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span>
- <span class="special">}</span>
+ <span class="special">}</span> <span class="identifier">BOOST_STM_TRANSACTION</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
@@ -104,37 +104,38 @@
of TM solutions into algorithms of new and legacy systems.
</p>
<a name="toward_boost_stm.users_guide.tutorial.a_simple_transaction.linked_list_declaration"></a><h5>
-<a name="id4815701"></a>
+<a name="id4815743"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.a_simple_transaction.linked_list_declaration">Linked
list declaration</a>
</h5>
<p>
- A clasical linked list use a list node chained following the memer next_.
+ A clasical linked list use a list node chained following the member next_.
On a transactional context we nedd to state that the pointer to the next
- node is a transactional one. This is reached using the smart pointer tx_ptr<>
+ node is a transactional one. This is reached using the smart pointer tx::pointer<>
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">list_node</span> <span class="special">{</span>
- <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="identifier">next_</span><span class="special">;</span>
+ <span class="identifier">tx</span><span class="special">::</span><span class="identifier">object</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">value_</span><span class="special">;</span>
+ <span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer</span><span class="special"><</span><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="identifier">next_</span><span class="special">;</span>
<span class="special">}</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
<span class="keyword">class</span> <span class="identifier">linked_list</span> <span class="special">{</span>
<span class="comment">// ...
</span><span class="keyword">private</span><span class="special">:</span>
- <span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="identifier">head_</span><span class="special">;</span>
+ <span class="identifier">tx</span><span class="special">::</span><span class="identifier">pointer</span><span class="special"><</span><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="identifier">head_</span><span class="special">;</span>
+ <span class="identifier">tx</span><span class="special">::</span><span class="identifier">uint_t</span> <span class="identifier">size_</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<a name="toward_boost_stm.users_guide.tutorial.a_simple_transaction.insert_retry_transaction"></a><h5>
-<a name="id4815923"></a>
+<a name="id4816039"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.a_simple_transaction.insert_retry_transaction">Insert
retry transaction</a>
</h5>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">insert</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">val</span><span class="special">)</span> <span class="special">{</span>
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">stm</span><span class="special">::</span><span class="identifier">transaction</span> <span class="identifier">_</span><span class="special">;</span> <span class="special">!</span><span class="identifier">_</span><span class="special">.</span><span class="identifier">committed</span><span class="special">()</span> <span class="special">&&</span> <span class="identifier">_</span><span class="special">.</span><span class="identifier">restart</span><span class="special">();</span> <span class="identifier">_</span><span class="special">.</span><span class="identifier">no_throw_end</span><span class="special">())</span>
- <span class="keyword">try</span> <span class="special">{</span>
+ <span class="identifier">BOOST_STM_TRANSACTION</span> <span class="special">{</span>
<span class="comment">// ... see below
-</span> <span class="special">}</span> <span class="keyword">catch</span> <span class="special">(</span><span class="identifier">aborted_transaction_exception</span><span class="special">&)</span> <span class="special">{}</span>
+</span> <span class="special">}</span> <span class="identifier">BOOST_STM_END_TRANSACTION</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
@@ -157,10 +158,26 @@
with its absorption of aborted transactions and only aborted transactions.
</p>
<a name="toward_boost_stm.users_guide.tutorial.a_simple_transaction.insert_specific"></a><h5>
-<a name="id4816172"></a>
+<a name="id4816171"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.a_simple_transaction.insert_specific">Insert
specific</a>
</h5>
+<pre class="programlisting"><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">*</span> <span class="identifier">prev</span> <span class="special">=</span> <span class="identifier">head_</span><span class="special">;</span>
+<span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">*</span> <span class="identifier">curr</span> <span class="special">=</span> <span class="identifier">prev</span><span class="special">-></span><span class="identifier">next_</span><span class="special">;</span>
+<span class="keyword">while</span> <span class="special">(</span><span class="identifier">curr</span><span class="special">!=</span><span class="number">0</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">curr</span><span class="special">-></span><span class="identifier">value_</span> <span class="special">==</span> <span class="identifier">val</span><span class="special">)</span> <span class="keyword">return</span><span class="special">;</span>
+ <span class="keyword">else</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">curr</span><span class="special">-></span><span class="identifier">value_</span> <span class="special">></span> <span class="identifier">val</span><span class="special">)</span> <span class="keyword">break</span><span class="special">;</span>
+ <span class="identifier">prev</span> <span class="special">=</span> <span class="identifier">curr</span><span class="special">;</span>
+ <span class="identifier">curr</span> <span class="special">=</span> <span class="identifier">curr</span><span class="special">-></span><span class="identifier">next_</span><span class="special">;</span>
+<span class="special">}</span>
+<span class="keyword">if</span> <span class="special">(</span><span class="identifier">curr</span><span class="special">==</span><span class="number">0</span> <span class="special">||</span> <span class="special">(</span><span class="identifier">curr</span><span class="special">-></span><span class="identifier">value_</span> <span class="special">></span> <span class="identifier">val</span><span class="special">))</span> <span class="special">{</span>
+ <span class="identifier">prev</span><span class="special">-></span><span class="identifier">next_</span><span class="special">=</span><span class="identifier">BOOST_STM_NEW</span><span class="special">(</span><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">val</span><span class="special">,</span> <span class="identifier">curr</span><span class="special">));</span>
+ <span class="special">++</span><span class="identifier">size_</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ with smart pointers
+ </p>
<pre class="programlisting"><span class="identifier">upgrd_ptr</span><span class="special"><</span><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="identifier">prev</span><span class="special">(</span><span class="identifier">_</span><span class="special">,</span> <span class="identifier">head_</span><span class="special">);</span>
<span class="identifier">upgrd_ptr</span><span class="special"><</span><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="identifier">curr</span><span class="special">(</span><span class="identifier">_</span><span class="special">,</span> <span class="identifier">head_</span><span class="special">-></span><span class="identifier">next_</span><span class="special">);</span>
<span class="keyword">while</span> <span class="special">(</span><span class="identifier">curr</span><span class="special">)</span> <span class="special">{</span>
@@ -269,16 +286,16 @@
<p>
Client Invoked Inserts / Moves.
</p>
-<pre class="programlisting"><span class="identifier">tx_ptr</span><span class="special"><</span><span class="identifier">linked_list</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="identifier">llist</span><span class="special">;</span>
+<pre class="programlisting"><span class="identifier">linked_list</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">llist</span><span class="special">;</span>
<span class="special">...</span>
-<span class="identifier">atomic</span><span class="special">(</span><span class="identifier">_</span><span class="special">)</span> <span class="special">{</span>
+<span class="identifier">BOOST_STM_TRANSACTION</span> <span class="special">{</span>
<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special"><</span> <span class="number">100</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">llist</span><span class="special">-></span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span>
+ <span class="identifier">llist</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span>
<span class="special">}</span>
<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">j</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">j</span> <span class="special"><</span> <span class="number">100</span><span class="special">;</span> <span class="special">++</span><span class="identifier">j</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">llist</span><span class="special">-></span><span class="identifier">move</span><span class="special">(</span><span class="identifier">j</span><span class="special">,</span> <span class="special">-</span><span class="identifier">j</span><span class="special">);</span>
+ <span class="identifier">llist</span><span class="special">.</span><span class="identifier">move</span><span class="special">(</span><span class="identifier">j</span><span class="special">,</span> <span class="special">-</span><span class="identifier">j</span><span class="special">);</span>
<span class="special">}</span>
-<span class="special">}</span>
+<span class="special">}</span> <span class="identifier">BOOST_STM_END_TRANSACTION</span><span class="special">;</span>
</pre>
<p>
The client invoked inserts and moves are fairly straight forward. The insert
@@ -291,24 +308,25 @@
Remove
</p>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">remove</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">val</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">use_atomic</span><span class="special">(</span><span class="identifier">_</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">BOOST_STM_TRANSACTION</span> <span class="special">{</span>
<span class="comment">// find the node whose val matches the request
-</span> <span class="identifier">upgrd_ptr</span><span class="special"><</span><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="identifier">prev</span><span class="special">(</span><span class="identifier">_</span><span class="special">,</span><span class="identifier">head_</span><span class="special">);</span>
- <span class="identifier">upgrd_ptr</span><span class="special"><</span><span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="identifier">curr</span><span class="special">(</span><span class="identifier">_</span><span class="special">,</span><span class="identifier">prev</span><span class="special">-></span><span class="identifier">next_</span><span class="special">);</span>
+</span> <span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">*</span> <span class="identifier">prev</span><span class="special">=</span><span class="identifier">head_</span><span class="special">;</span>
+ <span class="identifier">list_node</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">*</span> <span class="identifier">curr</span><span class="special">=</span><span class="identifier">prev</span><span class="special">-></span><span class="identifier">next_</span><span class="special">;</span>
<span class="keyword">while</span> <span class="special">(</span><span class="identifier">curr</span><span class="special">)</span> <span class="special">{</span>
<span class="comment">// if we find the node, disconnect it and end the search
</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">curr</span><span class="special">-></span><span class="identifier">value_</span> <span class="special">==</span> <span class="identifier">val</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">make_wr_ptr</span><span class="special">(</span><span class="identifier">_</span><span class="special">,</span> <span class="identifier">prev</span><span class="special">)-></span><span class="identifier">next_</span><span class="special">=</span><span class="identifier">curr</span><span class="special">-></span><span class="identifier">next_</span><span class="special">;</span>
- <span class="identifier">delete_ptr</span><span class="special">(</span><span class="identifier">_</span><span class="special">,</span><span class="identifier">curr</span><span class="special">);</span>
+ <span class="identifier">prev</span><span class="special">-></span><span class="identifier">next_</span><span class="special">=</span><span class="identifier">curr</span><span class="special">-></span><span class="identifier">next_</span><span class="special">;</span>
+ <span class="comment">// delete curr...
+</span> <span class="identifier">BOOST_STM_DELETE_PTR</span><span class="special">(</span><span class="identifier">curr</span><span class="special">);</span>
+ <span class="special">--</span><span class="identifier">size_</span><span class="special">;</span>
<span class="keyword">break</span><span class="special">;</span>
<span class="special">}</span> <span class="keyword">else</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">curr</span><span class="special">-></span><span class="identifier">value_</span> <span class="special">></span> <span class="identifier">val</span><span class="special">)</span> <span class="special">{</span>
- <span class="comment">// this means the search failed
-</span> <span class="keyword">break</span><span class="special">;</span>
+ <span class="keyword">break</span><span class="special">;</span>
<span class="special">}</span>
<span class="identifier">prev</span> <span class="special">=</span> <span class="identifier">curr</span><span class="special">;</span>
<span class="identifier">curr</span> <span class="special">=</span> <span class="identifier">prev</span><span class="special">-></span><span class="identifier">next_</span><span class="special">;</span>
<span class="special">}</span>
- <span class="special">}</span>
+ <span class="special">}</span> <span class="identifier">BOOST_STM_END_TRANSACTION</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
@@ -322,10 +340,10 @@
Composed External Move
</p>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">move</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">v1</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span><span class="identifier">v2</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">use_atomic</span> <span class="special">{</span>
+ <span class="identifier">BOOST_STM_TRANSACTION</span> <span class="special">{</span>
<span class="identifier">remove</span><span class="special">(</span><span class="identifier">v1</span><span class="special">);</span>
<span class="identifier">insert</span><span class="special">(</span><span class="identifier">v2</span><span class="special">);</span>
- <span class="special">}</span>
+ <span class="special">}</span> <span class="identifier">BOOST_STM_END_TRANSACTION</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
@@ -562,7 +580,7 @@
<span class="special">}</span>
</pre>
<a name="toward_boost_stm.users_guide.tutorial.a_dynamically_prioritized__composed_transaction.priority_inversion_allowed"></a><h5>
-<a name="id4820854"></a>
+<a name="id4821217"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.a_dynamically_prioritized__composed_transaction.priority_inversion_allowed">Priority
Inversion Allowed</a>
</h5>
@@ -589,7 +607,7 @@
for their specific needs.
</p>
<a name="toward_boost_stm.users_guide.tutorial.a_dynamically_prioritized__composed_transaction.the_future_of_parallel_programming"></a><h5>
-<a name="id4820956"></a>
+<a name="id4821319"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.a_dynamically_prioritized__composed_transaction.the_future_of_parallel_programming">The
Future of Parallel Programming</a>
</h5>
@@ -735,7 +753,7 @@
With the declarative approach, we can use
</p>
<p>
- If STM do not allows embeeded transactional objects, we force the user
+ If STM do not allows embedded transactional objects, we force the user
to use constant pointers to trasactional objects
</p>
<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">C</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">transaction_object</span><span class="special"><</span><span class="identifier">C</span><span class="special">></span> <span class="special">{...};</span>
@@ -778,7 +796,7 @@
values from a function</a>
</h4></div></div></div>
<a name="toward_boost_stm.users_guide.tutorial.returning_values_from_a_function.returning_from_outside_the_transaction_context"></a><h5>
-<a name="id4822561"></a>
+<a name="id4822924"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.returning_values_from_a_function.returning_from_outside_the_transaction_context">Returning
from outside the transaction context</a>
</h5>
@@ -795,7 +813,7 @@
<span class="special">}</span>
</pre>
<a name="toward_boost_stm.users_guide.tutorial.returning_values_from_a_function.returning_from_inside"></a><h5>
-<a name="id4822737"></a>
+<a name="id4823100"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.returning_values_from_a_function.returning_from_inside">Returning
from inside</a>
</h5>
@@ -834,7 +852,7 @@
care of modifications of the pointer itself.
</p>
<a name="toward_boost_stm.users_guide.tutorial.pointer_to_transactional_objects.using_the_mixin_transaction_object_lt__gt_"></a><h5>
-<a name="id4823140"></a>
+<a name="id4823503"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.pointer_to_transactional_objects.using_the_mixin_transaction_object_lt__gt_">Using
the mixin transaction_object<></a>
</h5>
@@ -898,11 +916,11 @@
<a name="toward_boost_stm.users_guide.tutorial.polymorphic"></a>Polymorphic
</h4></div></div></div>
<p>
- How the user can defien a transactional class <code class="computeroutput"><span class="identifier">D</span></code>
+ How the user can define a transactional class <code class="computeroutput"><span class="identifier">D</span></code>
inheriting from a transactional class <code class="computeroutput"><span class="identifier">B</span></code>
</p>
<a name="toward_boost_stm.users_guide.tutorial.polymorphic.using_the_mixin_transaction_object_lt__gt_"></a><h5>
-<a name="id4824279"></a>
+<a name="id4824642"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.polymorphic.using_the_mixin_transaction_object_lt__gt_">Using
the mixin transaction_object<></a>
</h5>
@@ -936,7 +954,7 @@
<span class="special">*</span><span class="identifier">ptr_b</span> <span class="special">=</span> <span class="identifier">BOOST_STM_NEW</span><span class="special">(</span><span class="identifier">_</span><span class="special">,</span> <span class="identifier">D</span><span class="special">());</span>
</pre>
<a name="toward_boost_stm.users_guide.tutorial.polymorphic.using_the_wrapper_transactional_object_lt__gt_"></a><h5>
-<a name="id4824643"></a>
+<a name="id4825006"></a>
<a href="tutorial.html#toward_boost_stm.users_guide.tutorial.polymorphic.using_the_wrapper_transactional_object_lt__gt_">Using
the wrapper transactional_object<></a>
</h5>
Modified: sandbox/stm/branches/vbe/libs/stm/doc/installation.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/installation.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/installation.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -11,9 +11,9 @@
[section:install Installing STM]
[/======================================]
-__Boost_STM__ is currently in an alpha release stage. This means our STM library is downloadable, but is undergoing some fundamental changes. Furthermore, our alpha release of TBoost.STM may exhibit some stability issues. While our internal tests have shown TBoost.STM to be fairly stable, your usage may vary.
+__Boost_STM__ is currently in an alpha release stage. This means our STM library is downloadable, but is undergoing some fundamental changes. Furthermore, our alpha release of __Boost_STM__ may exhibit some stability issues. While our internal tests have shown __Boost_STM__ to be fairly stable, your usage may vary.
-__Boost_STM_s__ current alpha download is mainly intended for other researchers who are curious about TBoost.STM's implementation and transactional memory. While we encourage non-TM experts to download the library and explore writing parallel code within its framework, we want such users know the system is in its early stages. As such, your usage of TBoost.STM may reveal some weaknesses or stability issues. Until we are into a fully released version, these issues are to be expected. However, please let us know if you encounter any problems using our library and we will do our best to resolve such issues immediately.
+__Boost_STM_s__ current alpha download is mainly intended for other researchers who are curious about __Boost_STM_s__ implementation and transactional memory. While we encourage non-TM experts to download the library and explore writing parallel code within its framework, we want such users know the system is in its early stages. As such, your usage of __Boost_STM__ may reveal some weaknesses or stability issues. Until we are into a fully released version, these issues are to be expected. However, please let us know if you encounter any problems using our library and we will do our best to resolve such issues immediately.
Thank you for considering __Boost_STM__ and we hope you enjoy exploring transactional memory!
@@ -28,7 +28,7 @@
[/Boost.STM by downloading [^stm.zip] from the
[@http://www.boost-consulting.com/vault/index.php?directory=Concurrent%20Programming Boost Vault]]
-You can also access the latest (unstable?) state from the [@https://svn.boost.org/svn/boost/sandbox/stm Boost Sandbox].
+You can also access the latest (unstable?) state from the [@https://svn.boost.org/svn/boost/sandbox/stm/branches/vbe Boost Sandbox].
[/=================================]
@@ -49,7 +49,7 @@
[@http://sourceware.org/pthreads-win32/ POSIX threads (pthreads) for Windows]
-In order to be more portable __Boost_STM__ is migrating to Boost. You should use either Boost version 1.39.x or the version in SVN trunk (even if Boost version 1.35.x should works also). In particular, __Boost_STM__ will depends on:
+In order to be more portable __Boost_STM__ is migrating to Boost. You should use either Boost version 1.39.x or the version in SVN trunk (even if Boost version 1.35.x should works also). In particular, __Boost_STM__ depends on:
[variablelist
[
@@ -66,7 +66,7 @@
]
]
-In addition __Boost_STM__ will uses the following libraries on the Boost Sandbox
+In addition __Boost_STM__ uses the following libraries on the Boost Sandbox
[variablelist
[
Modified: sandbox/stm/branches/vbe/libs/stm/doc/introduction.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/introduction.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/introduction.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -10,11 +10,11 @@
[heading Transactional Memory]
-Transactional memory is a modern type of concurrency control that uses transactions as its synchronization mechanism. A transaction is a finite sequence of operations that are executed in an atomic, isolated and consistent manner. The atomicity, isolation and consistency (ACI) of transaction's are derived from the ACID principle in the database community. TM does not exhibit the D (durability) of ACID because unlike database transactions, TM transactions are not saved to permanent storage (e.g., hard drives).
+Transactional memory(TM) is a modern type of concurrency control that uses transactions as its synchronization mechanism. A transaction is a finite sequence of operations that are executed in an *atomic*, *isolated* and *consistent* manner. The atomicity, isolation and consistency (*ACI*) of transaction's are derived from the ACID principle in the database community. TM does not exhibit the D (durability) of ACID because unlike database transactions, TM transactions are not saved to permanent storage (e.g., hard drives).
Transactions are executed speculatively (optimistically) and are checked for consistency at various points in the transaction's lifetime. Programmers specify the starting and ending points of a transaction. All of the operations between those points make up the transaction's execution body. Transactions are commonly represented using the atomic structure shown in the figure below.
- 1 atomic
+ 1 transaction
2 {
3 ++x;
4 --y;
@@ -38,7 +38,7 @@
[heading Simplicity]
-Synchronization problems, such as deadlocks, livelocks and priority inversion are common in software systems using mutual exclusion. TM avoids many of these problems by providing a synchronization mechanism that does not expose any of its implementation details to the programmer. The only interfaces the programmer needs to use for TM is as follows:
+Synchronization problems, such as deadlocks, livelocks and priority inversion are common in software systems using mutual exclusion. TM avoids many of these problems by providing a synchronization mechanism that does not expose any of its implementation details to the programmer. The only low level interfaces the programmer needs to use for TM are:
* begin_tx() - the signaled start of the transaction.
* read(loc) - reads the specified memory location, storing its location in the transaction's read set and returning its current value.
@@ -50,17 +50,17 @@
All TM implementations use some combination of the above interfaces. TMs implemented within compilers tend to implicitly annotate transactional read() and write() operations, whereas those implemented within software libraries tend to require the programmer explicitly state which operations are transactional reads and writes. An example of a transaction using the above interfaces alongside an actual STM library implementation is shown in Figure 3.
1 // TM interfaces // __Boost_STM__
- 2 do { atomic(t)
+ 2 do { BOOST_STM_TRANSACTION
3 begin_tx(); {
- 4 write(x, read(x)+1); ++t.write(x);
- 5 write(y, read(y)-1); --t.write(y);
- 6 } while (end_tx()); } before_retry {}
+ 4 write(x, read(x)+1); ++x;
+ 5 write(y, read(y)-1); --y;
+ 6 } while (end_tx()); } BOOST_STM_END_TRANSACTION
Figure 3. Transaction Using (1) Explicit TM Interfaces and (2) __Boost_STM__.
Figure 3 implements the same transaction as shown in Figure 2, except all transactional memory accesses, including the transaction's retry behavior (e.g., its loop), are demonstrated from a simple TM interface perspective and an actual library implementation (__Boost_STM__). While most TM systems handle some portion of these interface calls implicitly, as is shown in the __Boost_STM__ transaction, it is important to note that even when all operations are made visible to the end programmer, transactions are still devoid of many concurrency problems, such as data races and deadlocks (explained below), that plague other types of concurrency control.
-For example, as long as the programmer properly annotates the access to the shared variables x and y as shown in Figure 3, it is impossible for race conditions or deadlocks to occur. Furthermore, the programmer does not need any program-specific knowledge to use shared data; he or she simply uses the TM interfaces supplied by the system and the resulting behavior is guaranteed to be consistent. This is explained in greater detail in Section 3.1.
+For example, as long as the programmer properly annotates the access to the shared variables x and y as shown in Figure 3, it is impossible for race conditions or deadlocks to occur. Furthermore, the programmer does not need any program-specific knowledge to use shared data; he or she simply uses the TM interfaces supplied by the system and the resulting behavior is guaranteed to be consistent. This is explained in greater detail in Section ???3.1.
Other types of concurrency control, such as mutual exclusion, cannot achieve the same interface simplicity, because part of their implementation is associated with, or exposed through, their interface. To demonstrate this, consider the fine-grained locking example of Figure 1 as shown below.
@@ -234,11 +234,11 @@
An external atomic grouping of operations is impossible using embedded mutual exclusion without exposing the implementation details because the heart of mutual exclusion is based on named variables which the programmer specifies to guard their critical sections. Because these variables are named, they cannot be abstracted away and any programmer wishing to reuse the mutually exclusive code must be able to access and extend the implementation details.
- 1 void inc(int v) { atomic { g += v; } }
+ 1 void inc(int v) { transaction { g += v; } }
2
- 3 void mult(int v) { atomic { g *= v; } }
+ 3 void mult(int v) { transaction { g *= v; } }
4
- 5 int get() { atomic { return g; } }
+ 5 int get() { transaction { return g; } }
Figure 9. TM of Increment, Multiply and Get of Shared Variable.
@@ -262,14 +262,14 @@
Even with transactions, this approach fails because the transactions within inc() and mult() begin and end inside their respective functions. However, to make the above operations atomic, the programmer need only make the following modification shown in Figure 10.
- 1 atomic { // atomic {
- 2 inc(a); // atomic { g += a; }
- 3 mult(-b); // atomic { g *= -b; }
- 4 } // }
+ 1 transaction { // transaction {
+ 2 inc(a); // transaction { g += a; }
+ 3 mult(-b); // transaction { g *= -b; }
+ 4 } // }
Figure 10. Modularity: Transaction of Increment and Multiply.
-In effect, the TM system subsumes the transactions that are nested inside of the inc() and mult() operations. 6 The left side of Figure 10 shows the actual code of the transaction, while the right side shows the child transactions that are subsumed by the parent transaction.
+In effect, the TM system subsumes the transactions that are nested inside of the inc() and mult() operations. The left side of Figure 10 shows the actual code of the transaction, while the right side shows the child transactions that are subsumed by the parent transaction.
Because transactions are isolated and atomic, the resulting state of g, from operations inc() and mult(), is invisible to outside observers until the transaction is committed. As such, outside threads cannot view any intermediate state constructed by partial transaction execution. The result of such isolated behavior is the guaranteed consistent concurrent execution of interleaved accesses to shared memory from in-flight transactions. This is demonstrated in Figure 11; let g=0 and assume deferred update is the active updating policy, as explained in Section 4.2.
Modified: sandbox/stm/branches/vbe/libs/stm/doc/overview.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/overview.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/overview.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -24,18 +24,18 @@
[*__Boost_STM__] provides:
-* Optimistic concurrency
-* ACI transactions
+* *Optimistic* concurrency
+* *ACI* transactions
* Atomic: all operations execute or none do
* Consistent: only legal memory states
* Isolated: other txes cannot see until committed
-* Language-like atomic transaction macro blocks
+* *Language-like* atomic transaction macro blocks
* Closed, flattened composable transactions
-* Direct and deferred updating run-time policies
-* Validation and invalidation conflict detection policies
-* Lock-aware transactions
-* Programmable contention management, enabling programmers to specify forward progress mechanisms
-* Isolated and irrevocable transactions for transactions that must commit (i.e., I/O transactions)
+* *Direct* and *deferred updating* run-time policies
+* *Validation* and *invalidation* conflict detection policies
+* *Lock-aware* transactions
+* *Programmable contention management*, enabling programmers to specify forward progress mechanisms
+* Isolated and *irrevocable* transactions for transactions that must commit (i.e., I/O transactions)
[/====================================]
Modified: sandbox/stm/branches/vbe/libs/stm/doc/reference.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/reference.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/reference.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -29,29 +29,22 @@
* Mixins
* Wrappers
-[section Mixins Transactional Objects]
+[section Transactional Objects]
-Mixing transactional objects can be deep or shallow copied.
-
-Both schemas can be used by the same smart pointers.
-
-[section Deep Copy]
-[include reference/transaction_object.qbk]
-[include reference/transaction_object_ptr.qbk]
-[include reference/tx/numeric.qbk]
-[include reference/tx/pointer.qbk]
-[endsect]
-
-[section Shallow Copy]
+[include reference/deep_transaction_object.qbk]
[include reference/shallow_transaction_object.qbk]
-[endsect]
-
-[section Smart pointers]
+[include reference/transaction_object.qbk]
[include reference/smart_pointers.qbk]
[endsect]
+[section Built-in Transactional Objects]
+[include reference/tx/proxy_cache.qbk]
+[include reference/tx/object.qbk]
+[include reference/tx/numeric.qbk]
+[include reference/tx/pointer.qbk]
[endsect]
+[/
[section Warppers Transactional Objects]
[include reference/transactional_object.qbk]
@@ -67,6 +60,16 @@
[include reference/non_tx/smart_ptr.qbk]
[endsect]
[endsect]
+]
+
+[section Transaction Specific Memory Managers]
+[endsect]
+
+[section User Memory Managers]
+[endsect]
+
+[section Synchronization]
+[endsect]
[section Contention Managers]
[include reference/contention_managers/concept.qbk]
Added: sandbox/stm/branches/vbe/libs/stm/doc/reference/deep_transaction_object.qbk
==============================================================================
--- (empty file)
+++ sandbox/stm/branches/vbe/libs/stm/doc/reference/deep_transaction_object.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -0,0 +1,74 @@
+[/
+ (C) Copyright 2009 Justin E. Gottchlich.
+ (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:deep_transaction_object_hpp Header `<boost/stm/deep_transaction_object.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace stm {
+ template <class Final, typename Base=base_transaction_object>
+ class deep_transaction_object;
+ template <class Final, typename Base1, typename Base2>
+ class deep_transaction_object2;
+ }}
+
+[section Template Class `deep_transaction_object<>`]
+
+To further simplify the usage of __Boost_STM__, an intermediate template class was built which is meant to sit between the `base_transaction_object` and the user-defined transaction objects. The purpose of this intermediate class is to reduce the code overhead needed for user-defined transaction objects. To do this, the curiously recurring template pattern developed by James Coplien was used.
+
+With the templatized `deep_transaction_object`, client-side transaction objects need only to derive from it and pass their class type as its template parameter. At compile-time the deep_transaction_object generates the necessary code to override all the virtual functions and efine the static function `make_ache()` and implement operator `new` and operator `delete` using __Boost_STM_s__ memory manager for all user-defined types derived from it.
+
+ template <class Final, typename Base>
+ class deep_transaction_object : public base_transaction_object {
+ public:
+ static Final* make_cache(Final const* rhs, transaction& t);
+ base_transaction_object* make_cache(transaction& t) const;
+ void delete_cache();
+ void copy_cache(base_transaction_object const *rhs);
+ };
+
+[section Static Member Function `make_cache(Final const& rhs)`]
+
+ virtual base_transaction_object* make_cache(transaction* t) const;
+
+The `make_cache()` creates a new `Final` instace using the copy constructor cloning `rhs`.
+
+[endsect]
+
+[section Member Function `make_cache()`]
+
+ virtual base_transaction_object* make_cache(transaction* t) const;
+
+The `make_cache()` creates a new `Final` instace using the copy constructor cloning `this`.
+
+[endsect]
+
+
+[section Member function `copy_cache()`]
+
+ virtual void copy_cache(base_transaction_object const * const rhs);
+
+The `copy_cache()` assigns an incomplete smart cast of `rhs` to `this` instance using the copy-assignement operator.
+
+[endsect]
+
+[section Virtual function `delete_cache()`]
+
+ virtual void delete_cache();
+
+The `delete_cache()` deletes this instace using the `delete` operator.
+
+[endsect]
+[endsect]
+
+[endsect]
+
+
+
+
Modified: sandbox/stm/branches/vbe/libs/stm/doc/reference/shallow_transaction_object.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/reference/shallow_transaction_object.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/reference/shallow_transaction_object.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -12,57 +12,89 @@
[/==========================================================================================]
namespace boost { namespace stm {
+ struct shallow_t;
+ const shallow_t shallow;
+
+ template <class T>
+ struct has_shallow_copy_semantics : boost::mpl::false_
+ {};
+
template <class Derived, typename Base=base_transaction_object>
class shallow_transaction_object;
+ template <class Derived, typename Base1, typename Base2>
+ class shallow_transaction_object2;
}}
+[section Class `shallow_t`]
+
+ struct shallow_t {};
+
+Shallow type tag to make a difference between the standard copy constructor and the shallow copy constructor.
+
+[endsect]
+
+[section Constant `shallow`]
+ const shallow_t shallow = {};
+
+[endsect]
+
+[section Template Class `has_shallow_copy_semantics<>`]
+
+Has shallow copy semantic traits. By default it is false. The user need to specialize this class if STM should take advantage of the shallow copy semantics.
+
+[endsect]
+
[section Template Class `shallow_transaction_object<>`]
-To further simplify the usage of __Boost_STM__, an intermediate template class was built which is meant to sit between the base_transaction_object and the user-defined transaction objects. The purpose of this intermediate class is to reduce the code overhead needed for user-defined transaction objects. To do this, the curiously recurring template pattern developed by James Coplien was used.
+To further simplify the usage of __Boost_STM__, an intermediate template class was built which is meant to sit between the `base_transaction_object` and the user-defined transaction objects. The purpose of this intermediate class is to reduce the code overhead needed for user-defined transaction objects. To do this, the curiously recurring template pattern developed by James Coplien was used.
+
+With the templatized `deep_transaction_object`, client-side transaction objects need only to derive from it and pass their class type as its template parameter. At compile-time the deep_transaction_object generates the necessary code to override all the virtual functions and efine the static function `make_cache()` and implement operator `new` and operator `delete` using __Boost_STM_s__ memory manager for all user-defined types derived from it.
-With the templatized `shallow_transaction_object`, client-side transaction objects need only to derive from it and pass their class type as its template parameter. At compile-time the transaction_object generates the necessary code to override copy_state() and implement operator new and operator delete using __Boost_STM_s__ memory manager for all user-defined types derived from it.
template <class Derived, typename Base=base_transaction_object>
class shallow_transaction_object : public base_transaction_object {
public:
-
- virtual base_transaction_object* clone(transaction* t) const;
- virtual void cache_deallocate();
-
- virtual void copy_state(base_transaction_object const * const rhs);
- virtual void move_state(base_transaction_object * rhs);
+ static Final* make_cache(Final const* rhs, transaction& t);
+ base_transaction_object* make_cache(transaction& t) const;
+ void delete_cache();
+ void copy_cache(base_transaction_object const *rhs);
};
-[section Virtual function `clone()`]
+[section Static Member Function `make_cache(Final const& rhs)`]
- virtual base_transaction_object* clone(transaction* t) const;
+ virtual base_transaction_object* make_cache(transaction* t) const;
-The clone() method calls to the free function cache_new_copy which allocates enough memory for the new object and then do a memcpy by default.
+The `make_cache()` creates a new `Final` instace using the shallow copy constructor cloning `rhs`.
+The `make_cache()` method calls to the free function `cache_allocate` which allocates enough memory for the new object and then do a shallow copy.
[endsect]
+[section Virtual function `make_cache()`]
-[section Virtual function `copy_state()`]
-
- virtual void copy_state(base_transaction_object const * const rhs);
+ virtual base_transaction_object* make_cache(transaction* t) const;
-The copy_state() method call to the free function cache_copy which do a memcpy by default.
+The `make_cache()` creates a new `Final` instace using the shallow copy constructor cloning `this`.
+The `make_cache()` method calls to the free function `cache_allocate` which allocates enough memory for the new object and then do a shallow copy.
[endsect]
-[section Virtual function `move_state()`]
- virtual void move_state(base_transaction_object * rhs);
+[section Virtual function `copy_cache()`]
+
+ virtual void copy_cache(base_transaction_object const * const rhs);
-The move_state() method call to the free function cache_copy which do a memcpy by default.
+The `copy_cache()` method do a shallow assignement from an incomplete smart cast of `rhs` to the final instance associated to `this`.
[endsect]
-[section Virtual function `cache_deallocate()`]
- virtual void cache_deallocate();
+[section Virtual function `delete_cache()`]
+
+ virtual void delete_cache();
+
+The `delete_cache()` method deallowates this instance using the free function `cache_deallocate`.
-The cache_deallocate() method call to the free function cache_deallocate which do a memcpy by default.
+Note that the object is not destructed, as the cache instance is not see as a real instance.
[endsect]
[endsect]
Modified: sandbox/stm/branches/vbe/libs/stm/doc/reference/transaction_object.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/reference/transaction_object.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/reference/transaction_object.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -12,57 +12,64 @@
[/==========================================================================================]
namespace boost { namespace stm {
- template <class Derived> class transaction_object;
+ template <class B> struct virtually;
+ template <class Final, class Base=base_transaction_object>
+ class transaction_object;
+ template <class Final, class Base1, class Base2>
+ class transaction_object2;
+
template <typename T> class native_trans;
}}
-[section Template Class `transaction_object<>`]
-
-To further simplify the usage of __Boost_STM__, an intermediate template class was built which is meant to sit between the base_transaction_object and the user-defined transaction objects. The purpose of this intermediate class is to reduce the code overhead needed for user-defined transaction objects. To do this, the curiously recurring template pattern developed by James Coplien was used.
-
-With the templatized transaction_object, client-side transaction objects need only to derive from it and pass their class type as its template parameter. At compile-time the transaction_object generates the necessary code to override copy_state() and implement operator new and operator delete using __Boost_STM_s__ memory manager for all user-defined types derived from it.
-
- template <class Derived>
- class transaction_object : public base_transaction_object {
- public:
-
- virtual base_transaction_object* clone(transaction* t) const;
- virtual void copy_state(base_transaction_object const * const rhs);
- virtual void move_state(base_transaction_object * rhs);
- };
-
-[section Virtual function `clone()`]
-
- virtual base_transaction_object* clone(transaction* t) const;
-
-The clone() creates a new Derived instace using the copy constructor.
-
-[endsect]
-
-
-[section Virtual function `copy_state()`]
+[section Template Class `virtually<>`]
- virtual void copy_state(base_transaction_object const * const rhs);
-
-The copy_state() assigns the rhs to this instace using the copy-assignement operator.
+Virtualy inherits from its template parameter.
+ struct virtually : virtual B {
+ // forward constructors
+ };
+
[endsect]
-[section Virtual function `move_state()`]
-
- virtual void move_state(base_transaction_object * rhs);
-
-
-[endsect]
-
-[section Virtual function `cache_deallocate()`]
+[section Template Class `transaction_object<>`]
- virtual void cache_deallocate();
+To further simplify the usage of __Boost_STM__, an intermediate template class was built which is meant to sit between the deep_transaction_object or shallow_transaction_object, depending on whether the filanl class has shallow copy semantics, and the user-defined transaction objects.
-The cache_deallocate() delete this instace using the delete operator.
+ namespace detail {
+ template <class Final, class Base, bool hasShallowCopySemantics>
+ class transaction_object_aux;
+
+ template <class F, class B>
+ class transaction_object_aux<F, B, true>
+ : public shallow_transaction_object<F, B> {};
+ template <class F, class B>
+ class transaction_object_aux<F, B, false>
+ : public deep_transaction_object<F, B> {};
+
+ template <class Final, class Base1,class Base2, bool hasShallowCopySemantics>
+ class transaction_object2_aux;
+
+ template <class F, class B1, class B2>
+ class transaction_object2_aux<F, B1, B2, true>
+ : public shallow_transaction_object2<F, B1, B2> {};
+ template <class F, class B1, class B2>
+ class transaction_object2_aux<F, B1, B2, false>
+ : public deep_transaction_object2<F, B1, B2> {};
+ }
+
+ template <class Final, class Base>
+ class transaction_object
+ : public detail::transaction_object_aux<Final, Base, has_shallow_copy_semantics<Final>::value
+ >
+ {};
+
+ template <class Final, class Base1, class Base2>
+ class transaction_object2
+ : public detail::transaction_object2_aux<Final, Base1, Base2, has_shallow_copy_semantics<Final>::value
+ >
+ {};
[endsect]
-[endsect]
[section Template Class `native_trans<>`]
Modified: sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/numeric.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/numeric.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/numeric.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -14,6 +14,8 @@
namespace boost { namespace stm { namespace tx {
template <typename T> class numeric;
+ template <typename T>
+ struct has_shallow_copy_semantics<tx::numeric<T> >;
typedef numeric<bool> boolean;
typedef numeric<char> char_t;
@@ -33,21 +35,15 @@
[section Template Class `tx::numeric<>`]
template <typename T>
- class numeric : public transaction_object< numeric<T> >
- {
- protected:
- T val_;
+ class numeric : public proxy_cache< numeric<T>, T > {
public:
numeric();
- template<class U> numeric(numeric<U> const& u);
- template <typename U> numeric(U v);
-
- operator T() const;
- operator T&();
-
- T& ref();
- T value();
-
+ template<class U>
+ numeric(numeric<U> const& r);
+ template <typename U>
+ numeric(U v);
+ numeric(numeric const& rhs, stm::shallow_t);
+ numeric& shallow_assign(numeric const& rhs);
};
[endsect]
Added: sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/object.qbk
==============================================================================
--- (empty file)
+++ sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/object.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -0,0 +1,46 @@
+[/
+ (C) Copyright 2009 Justin E. Gottchlich.
+ (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:tx_object_hpp Header `<boost/stm/tx/pointer.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace stm { namespace tx {
+
+ template <typename T>
+ class object;
+ template <typename T>
+ struct has_shallow_copy_semantics<tx::object<T> >;
+
+ }}}
+
+[section Template Class `tx::object<>`]
+
+ template <typename T>
+ class object : public proxy_cache< object<T>, T > {
+ public:
+ object();
+ template<typename U>
+ object(object<U> const& r);
+ object(object const& r);
+ template <typename U>
+ object(U v);
+ object(T v);
+ object(object const& rhs, stm::shallow_t);
+ object& shallow_assign(object const& rhs);
+ };
+
+[endsect]
+
+[section Template Class `tx::pointer_to_member<>`]
+[endsect]
+
+
+[endsect]
+
Modified: sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/pointer.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/pointer.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/pointer.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -14,43 +14,42 @@
namespace boost { namespace stm { namespace tx {
template <typename T> class pointer;
- template <typename C, typename R> class pointer_to_member;
+ template <typename T>
+ struct has_shallow_copy_semantics<tx::pointer<T> >;
}}}
[section Template Class `tx::pointer<>`]
template <typename T>
- class pointer : public transaction_object< pointer<T> >
- {
- protected:
- T* val_;
+ class pointer : public proxy_cache< pointer<T>, T* > {
public:
pointer();
- template<class U> pointer(pointer<U> const& r);
+ pointer(pointer const& r);
+ template<class U>
+ pointer(pointer<U> const& r);
+
+ template<class U, class V, class B>
+ pointer(proxy_cache<U, V*, B> const& rhs);
- template <typename U> pointer(U* v);
pointer(T* v);
- ~pointer() {}
+ template <typename U>
+ pointer(U* v);
- operator T*() const;
- operator T*&();
+ template<class U, class V, class B>
+ pointer& operator=(proxy_cache<U, V*, B> const& rhs);
- T*& get();
- T const * get() const;
+ T* operator->() const;
+ T& operator*() const;
- T const * operator->() const;
- T const & operator*() const;
+ pointer(pointer const& rhs, stm::shallow_t);
+ // shallow assignment
+ pointer& shallow_assign(pointer const& rhs);
- T * operator->();
- T & operator*();
};
[endsect]
-[section Template Class `tx::pointer_to_member<>`]
-[endsect]
-
[endsect]
Added: sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/proxy_cache.qbk
==============================================================================
--- (empty file)
+++ sandbox/stm/branches/vbe/libs/stm/doc/reference/tx/proxy_cache.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -0,0 +1,61 @@
+[/
+ (C) Copyright 2009 Justin E. Gottchlich.
+ (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:tx_proxy_cache_hpp Header `<boost/stm/tx/proxy_cache.hpp>`]
+[/==========================================================================================]
+
+ namespace boost { namespace stm { namespace tx {
+
+ template <typename Final, typename T, typename Base=base_transaction_object>
+ class proxy_cache;
+ template <typename F, typename T, typename B>
+ struct has_shallow_copy_semantics<tx::proxy_cache<F,T,B> >;
+
+ }}}
+
+[section Template Class `tx::proxy_cache<>`]
+
+ template <typename Final, typename T, typename Base=base_transaction_object>
+ class proxy_cache : public transaction_object< Final, Base > {
+ protected:
+ T val_;
+ public:
+ typedef proxy_cache<Final, T, Base> this_type;
+ typedef Final final_type;
+ typedef T value_type;
+ proxy_cache();
+ proxy_cache(proxy_cache const& r);
+ template<typename F, typename U>
+ proxy_cache(proxy_cache<F,U> const& r);
+ proxy_cache(T v);
+ template <typename U>
+ proxy_cache(U v);
+
+ proxy_cache& operator=(proxy_cache const& rhs);
+ template<typename F, typename U>
+ proxy_cache& operator=(proxy_cache<F,U> const& rhs);
+
+ operator T() const;
+ operator T&();
+ T* address_of();
+
+ T& ref();
+ T value() const;
+
+ proxy_cache(proxy_cache const& rhs, stm::shallow_t);
+ proxy_cache& shallow_assign(proxy_cache const& rhs);
+ };
+
+[endsect]
+
+
+
+[endsect]
+
Modified: sandbox/stm/branches/vbe/libs/stm/doc/tutorial.qbk
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/doc/tutorial.qbk (original)
+++ sandbox/stm/branches/vbe/libs/stm/doc/tutorial.qbk 2010-03-07 05:26:02 EST (Sun, 07 Mar 2010)
@@ -25,36 +25,37 @@
tx_ptr<linked_list<int> > llist;
...
for (int i = 0; i < 100; ++i) {
- use_atomic(_) {
+ BOOST_STM_TRANSACTION {
llist->insert(i);
- }
+ } BOOST_STM_TRANSACTION;
}
After inspecting the above client invoked insert code it is apparent that the code itself shows no deep signs of being transactional. The two exceptions are the declaration of the list using a tx_ptr smart pointer and the fact that the insertion of the 100 elements is atomic. This is our desired behavior. As far as the client side programmer is concerned, there is no additional code needed to perform a transactional linked list insert over a non-transactional linked list insert. Obviously, this simplistic behavior eases the introduction of TM solutions into algorithms of new and legacy systems.
[heading Linked list declaration]
-A clasical linked list use a list node chained following the memer next_. On a transactional context we nedd to state that the pointer to the next node is a transactional one. This is reached using the smart pointer tx_ptr<>
+A clasical linked list use a list node chained following the member next_. On a transactional context we nedd to state that the pointer to the next node is a transactional one. This is reached using the smart pointer tx::pointer<>
template <typename T>
struct list_node {
- tx_ptr<list_node<T> > next_;
+ tx::object<T> value_;
+ tx::pointer<list_node<T> > next_;
}
template <typename T>
class linked_list {
// ...
private:
- tx_ptr<list_node<T> > head_;
+ tx::pointer<list_node<T> > head_;
+ tx::uint_t size_;
};
[heading Insert retry transaction]
void insert(T const &val) {
- for (boost::stm::transaction _; !_.committed() && _.restart(); _.no_throw_end())
- try {
+ BOOST_STM_TRANSACTION {
// ... see below
- } catch (aborted_transaction_exception&) {}
+ } BOOST_STM_END_TRANSACTION;
}
The exposed insert code performs two key operations: (1) it retries the transaction until it succeeds (commits) and (2) it catches aborted transaction exceptions. The retry code is perhaps the largest visible section of code overhead for the transactional linked list insert operation. While there are other C++ mechanisms to retry transactions, like gotos or macro-based approaches, we believe a simple loop is currently the best solution for TM retry behavior in C++. Others before us have implemented differing solutions that have smaller code footprints, but violate large-scale design concerns, break compositionality potential and hide or impose large language penalties. As such, we currently accept the loop overhead as a small inconvenience and avoid breaking language semantics.
@@ -63,6 +64,21 @@
[heading Insert specific]
+ list_node<T> * prev = head_;
+ list_node<T> * curr = prev->next_;
+ while (curr!=0) {
+ if (curr->value_ == val) return;
+ else if (curr->value_ > val) break;
+ prev = curr;
+ curr = curr->next_;
+ }
+ if (curr==0 || (curr->value_ > val)) {
+ prev->next_=BOOST_STM_NEW(list_node<T>(val, curr));
+ ++size_;
+ }
+
+with smart pointers
+
upgrd_ptr<list_node<T> > prev(_, head_);
upgrd_ptr<list_node<T> > curr(_, head_->next_);
while (curr) {
@@ -133,40 +149,41 @@
Client Invoked Inserts / Moves.
- tx_ptr<linked_list<int> > llist;
+ linked_list<int> llist;
...
- atomic(_) {
+ BOOST_STM_TRANSACTION {
for (int i = 0; i < 100; ++i) {
- llist->insert(i);
+ llist.insert(i);
}
for (int j = 0; j < 100; ++j) {
- llist->move(j, -j);
+ llist.move(j, -j);
}
- }
+ } BOOST_STM_END_TRANSACTION;
The client invoked inserts and moves are fairly straight forward. The insert operations are performed first then the original items are moved to a new location by inverting their value. Again, from a client programming perspective, there is no hint that this code is transactional, which is our intended goal.
Remove
void remove(const T& val) {
- use_atomic(_) {
+ BOOST_STM_TRANSACTION {
// find the node whose val matches the request
- upgrd_ptr<list_node<T> > prev(_,head_);
- upgrd_ptr<list_node<T> > curr(_,prev->next_);
+ list_node<T> * prev=head_;
+ list_node<T> * curr=prev->next_;
while (curr) {
// if we find the node, disconnect it and end the search
if (curr->value_ == val) {
- make_wr_ptr(_, prev)->next_=curr->next_;
- delete_ptr(_,curr);
+ prev->next_=curr->next_;
+ // delete curr...
+ BOOST_STM_DELETE_PTR(curr);
+ --size_;
break;
} else if (curr->value_ > val) {
- // this means the search failed
break;
}
prev = curr;
curr = prev->next_;
}
- }
+ } BOOST_STM_END_TRANSACTION;
}
As was the case with the insert(), the above remove() method is almost identical to how a normal linked list remove operation would be implemented, with the exception of the atomic guard and a few __Boost_STM__ API calls. Again, this is ideal, as it leads to intuitive transactional programming, requiring only a minor learning curve for the algorithms developer.
@@ -174,10 +191,10 @@
Composed External Move
void move(T const &v1, T const &v2) {
- use_atomic {
+ BOOST_STM_TRANSACTION {
remove(v1);
insert(v2);
- }
+ } BOOST_STM_END_TRANSACTION;
}
The move() implementation do not requires any overhead required in non-transactional implementations, other than using the atomic guard. The remainder of the code is preserved.
@@ -355,7 +372,7 @@
With the declarative approach, we can use
-If STM do not allows embeeded transactional objects, we force the user to use constant pointers to trasactional objects
+If STM do not allows embedded transactional objects, we force the user to use constant pointers to trasactional objects
class C : public transaction_object<C> {...};
@@ -481,7 +498,7 @@
[section Polymorphic]
-How the user can defien a transactional class `D` inheriting from a transactional class `B`
+How the user can define a transactional class `D` inheriting from a transactional class `B`
[heading Using the mixin transaction_object<>]
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