mirror of
https://github.com/boostorg/thread.git
synced 2026-02-03 09:42:16 +00:00
Compare commits
76 Commits
boost-1.25
...
svn-branch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f795dce04 | ||
|
|
7496ecbc73 | ||
|
|
76e80ee4c4 | ||
|
|
8e2536fc54 | ||
|
|
9bbbfbe6ff | ||
|
|
a2fc9ebfaa | ||
|
|
16c78b81e2 | ||
|
|
e71b204d10 | ||
|
|
f64208ce7a | ||
|
|
3410029cad | ||
|
|
25fd0f52e7 | ||
|
|
095f16c4f1 | ||
|
|
5a4a5f405f | ||
|
|
7775aceb86 | ||
|
|
29177b34a7 | ||
|
|
ae1c315e0c | ||
|
|
3592d8c412 | ||
|
|
63fdf6ef22 | ||
|
|
915c2cd206 | ||
|
|
54abba952b | ||
|
|
7cee797d2e | ||
|
|
a7fb1e73d2 | ||
|
|
6a46149868 | ||
|
|
f07d726011 | ||
|
|
344ddb5fd2 | ||
|
|
537b623b18 | ||
|
|
ab180e79d1 | ||
|
|
089dc81880 | ||
|
|
73187a40b6 | ||
|
|
3d06b18e3e | ||
|
|
fd9d19b050 | ||
|
|
692aa0e352 | ||
|
|
307bbdc951 | ||
|
|
b460053eda | ||
|
|
df704a5dae | ||
|
|
9b76b71b5f | ||
|
|
427a109865 | ||
|
|
5662e2f6bb | ||
|
|
6a6fbd0553 | ||
|
|
5084e9ccd2 | ||
|
|
84cb093ee6 | ||
|
|
8305cad4f8 | ||
|
|
b52c5d45ec | ||
|
|
71103fe1bc | ||
|
|
57d262d4d6 | ||
|
|
acf721b0bd | ||
|
|
3ee4bf04dc | ||
|
|
6e4a874880 | ||
|
|
b07d60aa94 | ||
|
|
fb3aed485c | ||
|
|
cbf212f1cd | ||
|
|
562c4583d4 | ||
|
|
95053b7516 | ||
|
|
65d06c138e | ||
|
|
9e3e80558c | ||
|
|
d27e195ca2 | ||
|
|
0ae839e0bb | ||
|
|
21067cb309 | ||
|
|
5cb2a46ae4 | ||
|
|
66fa1995cf | ||
|
|
6e83cfdc72 | ||
|
|
c2930faaec | ||
|
|
64ad66034a | ||
|
|
101e7cfbda | ||
|
|
76de0ff7fd | ||
|
|
f70b32cc63 | ||
|
|
8ce4eeca24 | ||
|
|
2febaf386c | ||
|
|
1d6f10702d | ||
|
|
ebe3a7beee | ||
|
|
9e38dc5f48 | ||
|
|
6dafed21fc | ||
|
|
067d2a39f7 | ||
|
|
d70f46126b | ||
|
|
b282e06a90 | ||
|
|
abd2e68f8d |
@@ -61,7 +61,7 @@ William Kempf.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->29 August, 2001<!--webbot bot="Timestamp" endspan i-checksum="34360" -->
|
||||
</p>
|
||||
|
||||
<p>©<i> Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -135,7 +135,7 @@ the ISO standard language and library.
|
||||
<p>Note: The URL's above are provided in plain text form so that they will be visible
|
||||
on printed copies of this document.</p>
|
||||
<hr>
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->01 Oct 2001<!--webbot bot="Timestamp" endspan i-checksum="14990" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->17 Aug 2001<!--webbot bot="Timestamp" endspan i-checksum="14763" -->
|
||||
</p>
|
||||
|
||||
<p>© Copyright Beman Dawes, 2001</p>
|
||||
|
||||
@@ -118,7 +118,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -323,7 +323,7 @@ received: 4
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -93,7 +93,7 @@ The one exception to this is BOOST_HAS_THREADS.</p>
|
||||
</table>
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->18 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39344" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -232,7 +232,7 @@ William Kempf.</p>
|
||||
<p>The visibility rules are based on <a href="bibliography.html#Butenhof-97">[Butenhof
|
||||
97]</a>. </p>
|
||||
<hr>
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->01 Oct 2001<!--webbot bot="Timestamp" endspan i-checksum="14990" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->07 Aug 2001<!--webbot bot="Timestamp" endspan i-checksum="14762" -->
|
||||
</p>
|
||||
<p>© Copyright Beman Dawes, 2001</p>
|
||||
<p> </p>
|
||||
|
||||
@@ -164,7 +164,7 @@ by Darryl Green).</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->04 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39335" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->12 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39332" -->
|
||||
</p>
|
||||
|
||||
<p>©<i> Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -111,7 +111,7 @@ libraries, namely thread-safety. The C++ standard doesn't address threads at al
|
||||
world programs often make use of native threading support. A portable library that doesn't
|
||||
address the issue of thread-safety is there for not much help to a programmer who wants to
|
||||
use the library in his multi-threaded application. So there's a very great need for portable
|
||||
primitives that will allow the library developer to create <a href="definitions.html#Thread-safe">thread-safe</a>
|
||||
primitives that will allow the library developer to create <a href="file:///c:/boost/site/libs/thread/doc/definitions.html#Thread-safe">thread-safe</a>
|
||||
implementations. This
|
||||
need far out weighs the need for portable methods to create and manage threads.</p>
|
||||
|
||||
@@ -141,7 +141,7 @@ and barriers.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->03 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39333" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -232,7 +232,7 @@ a <a href="mutex_concept.html">mutex model</a>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->04 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39335" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -101,7 +101,7 @@ thread lock error - deadlock occurred.
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->10 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39328" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -259,7 +259,7 @@ resulting in undefined behavior such as a program crash.</p>
|
||||
#include <a href="../../../boost/thread/thread.hpp"><boost/thread/thread.hpp></a>
|
||||
#include <iostream>
|
||||
|
||||
boost::mutex io_mutex; // The iostreams are not guaranteed to be <a href="definitions.html#Thread-safe">thread-safe</a>!
|
||||
boost::mutex io_mutex; // The iostreams are not guaranteed to be <a href="file:///c:/boost/site/libs/thread/doc/definitions.html#Thread-safe">thread-safe</a>!
|
||||
|
||||
class counter
|
||||
{
|
||||
@@ -309,7 +309,7 @@ count == 4
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -265,7 +265,7 @@ concepts.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->03 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39333" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</A>
|
||||
|
||||
@@ -148,7 +148,7 @@ Users should not depend on this derivation, however, as implementations are free
|
||||
to meet the NonCopyable requirement in other ways.</p>
|
||||
|
||||
<hr>
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->12 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39332" -->
|
||||
</p>
|
||||
<p>© Copyright 2001 Beman Dawes</p>
|
||||
</body>
|
||||
|
||||
@@ -79,7 +79,7 @@ higher level concepts there's also an argument for accessibility.</p>
|
||||
<h2><a name="lock_objects">Rationale for the Lock Design</a></h2>
|
||||
|
||||
<p>Programmers who are used to multi-threaded programming issues will quickly note that the
|
||||
Boost.Thread's design for mutex lock concepts is not <a href="definitions.html#Thread-safe">thread-safe</a>
|
||||
Boost.Thread's design for mutex lock concepts is not <a href="file:///c:/boost/site/libs/thread/doc/definitions.html#Thread-safe">thread-safe</a>
|
||||
(this is clearly documented
|
||||
as well). At first this may seem like a serious design flaw. Why have a multi-threading primitive
|
||||
that's not thread-safe itself?</p>
|
||||
@@ -421,7 +421,7 @@ read, maintain, and be less likely to contain latent defects.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 August, 2001<!--webbot bot="Timestamp" endspan i-checksum="34355" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</A>
|
||||
|
||||
@@ -317,7 +317,7 @@ count == 4
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -124,7 +124,7 @@ int test_main(int, char*[])
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->06 August, 2001<!--webbot bot="Timestamp" endspan i-checksum="34352" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -203,7 +203,7 @@ class.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -251,7 +251,7 @@ locked
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->October 01, 2001<!--webbot bot="Timestamp" endspan i-checksum="30079" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->September 13, 2001<!--webbot bot="Timestamp" endspan i-checksum="37965" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -272,7 +272,7 @@ locked
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -216,7 +216,7 @@ global_data == 4
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -244,7 +244,7 @@ alarm sounded...
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</A>
|
||||
|
||||
@@ -177,7 +177,7 @@ count = 10
|
||||
</pre>
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->06 August, 2001<!--webbot bot="Timestamp" endspan i-checksum="34352" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace boost
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->04 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39335" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -204,7 +204,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
@@ -131,7 +131,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
|
||||
<p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->10 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39328" -->
|
||||
</p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>
|
||||
|
||||
66
example/Jamfile
Normal file
66
example/Jamfile
Normal file
@@ -0,0 +1,66 @@
|
||||
# (C) Copyright William E. Kempf 2001. Permission to copy, use, modify, sell and
|
||||
# distribute this software is granted provided this copyright notice appears
|
||||
# in all copies. This software is provided "as is" without express or implied
|
||||
# warranty, and with no claim as to its suitability for any purpose.
|
||||
#
|
||||
# Boost.Threads build and test Jamfile
|
||||
#
|
||||
# Declares the following targets:
|
||||
# 1. monitor, an example program.
|
||||
# 2. starvephil, an example program.
|
||||
# 3. tennis, an example program.
|
||||
|
||||
# declare the location of this subproject relative to the root
|
||||
subproject libs/thread/example ;
|
||||
|
||||
# Do some OS-specific setup
|
||||
if $(NT)
|
||||
{
|
||||
BOOST_THREADMON_LIB = <lib>../build/libboost_threadmon ;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_THREADMON_LIB = ;
|
||||
}
|
||||
|
||||
#######################
|
||||
|
||||
#
|
||||
# Declare the Boost.Threads monitor example program.
|
||||
#
|
||||
|
||||
exe monitor : monitor/monitor.cpp
|
||||
<lib>../build/libboost_thread
|
||||
$(BOOST_THREADMON_LIB)
|
||||
# requirements
|
||||
: <include>$(BOOST_ROOT)
|
||||
<threading>multi
|
||||
: debug release ;
|
||||
|
||||
#######################
|
||||
|
||||
#
|
||||
# Declare the Boost.Threads starvephil example program.
|
||||
#
|
||||
|
||||
exe starvephil : starvephil/starvephil.cpp
|
||||
<lib>../build/libboost_thread
|
||||
$(BOOST_THREADMON_LIB)
|
||||
# requirements
|
||||
: <include>$(BOOST_ROOT)
|
||||
<threading>multi
|
||||
: debug release ;
|
||||
|
||||
#######################
|
||||
|
||||
#
|
||||
# Declare the Boost.Threads tennis example program.
|
||||
#
|
||||
|
||||
exe tennis : tennis/tennis.cpp
|
||||
<lib>../build/libboost_thread
|
||||
$(BOOST_THREADMON_LIB)
|
||||
# requirements
|
||||
: <include>$(BOOST_ROOT)
|
||||
<threading>multi
|
||||
: debug release ;
|
||||
61
include/boost/thread/_atomic.hpp
Normal file
61
include/boost/thread/_atomic.hpp
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2001
|
||||
* William E. Kempf
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. William E. Kempf makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* Revision History (excluding minor changes for specific compilers)
|
||||
* 8 Feb 01 Initial version.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_ATOMIC_HPP
|
||||
#define BOOST_ATOMIC_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifndef BOOST_HAS_THREADS
|
||||
# error Thread support is unavailable!
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_HAS_WINTHREADS)
|
||||
# include <boost/thread/mutex.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
class atomic_t
|
||||
{
|
||||
public:
|
||||
typedef long value_type;
|
||||
|
||||
friend value_type read(const atomic_t&);
|
||||
friend value_type increment(atomic_t&);
|
||||
friend value_type decrement(atomic_t&);
|
||||
friend value_type swap(atomic_t&, value_type);
|
||||
friend value_type compare_swap(atomic_t&, value_type, value_type);
|
||||
|
||||
explicit atomic_t(value_type val=0)
|
||||
: _value(val)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
volatile value_type _value;
|
||||
#if !defined(BOOST_HAS_WINTHREADS)
|
||||
mutex _mutex;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern atomic_t::value_type read(const atomic_t&);
|
||||
extern atomic_t::value_type increment(atomic_t&);
|
||||
extern atomic_t::value_type decrement(atomic_t&);
|
||||
extern atomic_t::value_type swap(atomic_t&, atomic_t::value_type);
|
||||
extern atomic_t::value_type compare_swap(atomic_t&, atomic_t::value_type, atomic_t::value_type);
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_ATOMIC_HPP
|
||||
36
test/Jamfile
Normal file
36
test/Jamfile
Normal file
@@ -0,0 +1,36 @@
|
||||
# (C) Copyright William E. Kempf 2001. Permission to copy, use, modify, sell and
|
||||
# distribute this software is granted provided this copyright notice appears
|
||||
# in all copies. This software is provided "as is" without express or implied
|
||||
# warranty, and with no claim as to its suitability for any purpose.
|
||||
#
|
||||
# Boost.Threads build and test Jamfile
|
||||
#
|
||||
# Declares the following targets:
|
||||
# 1. test_thread, a unit test executable.
|
||||
|
||||
# declare the location of this subproject relative to the root
|
||||
subproject libs/thread/test ;
|
||||
|
||||
#######################
|
||||
|
||||
#
|
||||
# Declare the Boost.Threads unit test program.
|
||||
#
|
||||
|
||||
# Do some OS-specific setup
|
||||
if $(NT)
|
||||
{
|
||||
BOOST_THREADMON_LIB = <lib>../build/libboost_threadmon ;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_THREADMON_LIB = ;
|
||||
}
|
||||
|
||||
unit-test test_thread : test_thread.cpp
|
||||
<lib>../build/libboost_thread
|
||||
$(BOOST_THREADMON_LIB)
|
||||
# requirements
|
||||
: <include>$(BOOST_ROOT)
|
||||
<threading>multi
|
||||
: debug release ;
|
||||
Reference in New Issue
Block a user