Skip to content

Commit

Permalink
Thread: fix inspection report.
Browse files Browse the repository at this point in the history
[SVN r84329]
  • Loading branch information
viboes committed May 17, 2013
1 parent 7b48c02 commit 9d10bd0
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions example/perf_condition_variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace
{
typedef SharedData<Types> S;

auto best_producer_time = std::numeric_limits<Stopwatch::rep>::max();
auto best_producer_time = std::numeric_limits<Stopwatch::rep>::max BOOST_PREVENT_MACRO_SUBSTITUTION ();

std::vector<std::thread> consumers
{ consumer_count };
Expand All @@ -165,7 +165,7 @@ namespace
for (unsigned i = 0; i < consumer_count; ++i)
consumers[i].join();

best_producer_time = std::min(best_producer_time, shared_data.producer_time);
best_producer_time = std::min BOOST_PREVENT_MACRO_SUBSTITUTION (best_producer_time, shared_data.producer_time);

}

Expand Down
4 changes: 2 additions & 2 deletions example/perf_shared_mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void unique()

int main()
{
boost::chrono::high_resolution_clock::duration best_time(std::numeric_limits<boost::chrono::high_resolution_clock::duration::rep>::max());
boost::chrono::high_resolution_clock::duration best_time(std::numeric_limits<boost::chrono::high_resolution_clock::duration::rep>::max BOOST_PREVENT_MACRO_SUBSTITUTION ());
for (int i =100; i>0; --i) {
boost::chrono::high_resolution_clock clock;
boost::chrono::high_resolution_clock::time_point s1 = clock.now();
Expand All @@ -61,7 +61,7 @@ int main()
// t13.join();
boost::chrono::high_resolution_clock::time_point f1 = clock.now();
//std::cout << " Time spent:" << (f1 - s1) << std::endl;
best_time = std::min(best_time, f1 - s1);
best_time = std::min BOOST_PREVENT_MACRO_SUBSTITUTION (best_time, f1 - s1);

}
std::cout << "Best Time spent:" << best_time << std::endl;
Expand Down
7 changes: 4 additions & 3 deletions include/boost/thread/detail/is_convertible.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Copyright (C) 2011-2013 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)
//
// See http://www.boost.org/libs/thread for documentation.
//
Expand Down
7 changes: 4 additions & 3 deletions include/boost/thread/detail/memory.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Copyright (C) 2011-2013 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)
//
// See http://www.boost.org/libs/thread for documentation.
//
Expand Down
2 changes: 1 addition & 1 deletion include/boost/thread/future.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@ namespace boost
static_cast<base_type*>(this)->swap(other);
}

// todo this functioˆn must be private and friendship provided to the internal users.
// todo this function must be private and friendship provided to the internal users.
void set_async()
{
this->future_->set_async();
Expand Down
6 changes: 3 additions & 3 deletions include/boost/thread/v2/shared_mutex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ namespace boost {
BOOST_THREAD_INLINE shared_mutex();
BOOST_THREAD_INLINE ~shared_mutex();

#ifndef BOOST_NO_DELETED_FUNCTIONS
#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
shared_mutex(shared_mutex const&) = delete;
shared_mutex& operator=(shared_mutex const&) = delete;
#else // BOOST_NO_DELETED_FUNCTIONS
#else // BOOST_NO_CXX11_DELETED_FUNCTIONS
private:
shared_mutex(shared_mutex const&);
shared_mutex& operator=(shared_mutex const&);
public:
#endif // BOOST_NO_DELETED_FUNCTIONS
#endif // BOOST_NO_CXX11_DELETED_FUNCTIONS

// Exclusive ownership

Expand Down

0 comments on commit 9d10bd0

Please sign in to comment.