2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-03 21:52:07 +00:00

Compare commits

..

5 Commits

Author SHA1 Message Date
nobody
4db2e35a33 This commit was manufactured by cvs2svn to create tag
'Version_1_25_0'.

[SVN r11317]
2001-10-01 16:59:12 +00:00
Beman Dawes
ca2cf20cf3 1.25.0 Final runup
[SVN r11315]
2001-10-01 15:54:23 +00:00
Beman Dawes
b3acba1d2d commit after merging thread-initial into main trunk
[SVN r11258]
2001-09-25 19:20:11 +00:00
Beman Dawes
6d2731c463 commit after merging thread-initial into main trunk
[SVN r11250]
2001-09-25 16:57:26 +00:00
Beman Dawes
b7f8f8867c merge branch "thread-initial" into main trunk
[SVN r11243]
2001-09-25 00:04:45 +00:00
29 changed files with 29 additions and 192 deletions

View File

@@ -61,7 +61,7 @@ William Kempf.</p>
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p>©<i> Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -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 -->17 Aug 2001<!--webbot bot="Timestamp" endspan i-checksum="14763" -->
<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>
<p>© Copyright Beman Dawes, 2001</p>

View File

@@ -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 -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
<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>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -323,7 +323,7 @@ received: 4
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -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 -->18 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39344" -->
<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>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -232,7 +232,7 @@ William Kempf.</p>
<p>The visibility rules are based on <a href="bibliography.html#Butenhof-97">[Butenhof
97]</a>.&nbsp;</p>
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->01 Oct 2001<!--webbot bot="Timestamp" endspan i-checksum="14990" -->
</p>
<p>© Copyright Beman Dawes, 2001</p>
<p>&nbsp;</p>

View File

@@ -164,7 +164,7 @@ by Darryl Green).</p>
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -70,7 +70,7 @@
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p>©<i> Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -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="file:///c:/boost/site/libs/thread/doc/definitions.html#Thread-safe">thread-safe</a>
primitives that will allow the library developer to create <a href="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 -->03 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39333" -->
<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>
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -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 -->04 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39335" -->
<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>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -101,7 +101,7 @@ thread lock error - deadlock occurred.
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -259,7 +259,7 @@ resulting in undefined behavior such as a program crash.</p>
#include <a href="../../../boost/thread/thread.hpp">&lt;boost/thread/thread.hpp&gt;</a>
#include &lt;iostream&gt;
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>!
boost::mutex io_mutex; // The iostreams are not guaranteed to be <a href="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 -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
<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>
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -265,7 +265,7 @@ concepts.</p>
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</A>

View File

@@ -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 -->12 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39332" -->
<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>
<p>© Copyright 2001 Beman Dawes</p>
</body>

View File

@@ -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="file:///c:/boost/site/libs/thread/doc/definitions.html#Thread-safe">thread-safe</a>
Boost.Thread's design for mutex lock concepts is not <a href="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 -->17 August, 2001<!--webbot bot="Timestamp" endspan i-checksum="34355" -->
<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>
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</A>

View File

@@ -317,7 +317,7 @@ count == 4
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -124,7 +124,7 @@ int test_main(int, char*[])
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -203,7 +203,7 @@ class.</p>
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -251,7 +251,7 @@ locked
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->October 01, 2001<!--webbot bot="Timestamp" endspan i-checksum="30079" -->
</p>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -272,7 +272,7 @@ locked
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -216,7 +216,7 @@ global_data == 4
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -244,7 +244,7 @@ alarm sounded...
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <A href="mailto:williamkempf@hotmail.com">William E. Kempf</A>

View File

@@ -177,7 +177,7 @@ count = 10
</pre>
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -70,7 +70,7 @@ namespace boost
<hr>
<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>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 October, 2001<!--webbot bot="Timestamp" endspan i-checksum="38291" -->
</p>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -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 -->13 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39334" -->
<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>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -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 -->10 September, 2001<!--webbot bot="Timestamp" endspan i-checksum="39328" -->
<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>
<p><i>© Copyright <a href="mailto:williamkempf@hotmail.com">William E. Kempf</a>

View File

@@ -1,66 +0,0 @@
# (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 ;

View File

@@ -1,61 +0,0 @@
/*
*
* 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

View File

@@ -1,36 +0,0 @@
# (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 ;