BIND 10 trac2202, updated. 1943079713265d5ad64762b107288b6e501c70cf [2202] Merge branch 'trac2202' with the remote version.
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Oct 2 00:59:17 UTC 2012
The branch, trac2202 has been updated
via 1943079713265d5ad64762b107288b6e501c70cf (commit)
via dcde0c0b983dd0ce788d7273f0cf7e02b37a711d (commit)
via 46c77cb971eeb52802fba8091529c9947bfda05c (commit)
via af3d7616a9f65bf3effb25d2432d0955dcb5d03b (commit)
from 0ca39bfe35f856eb54ff77c50f5b2230ed20313b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1943079713265d5ad64762b107288b6e501c70cf
Merge: dcde0c0 0ca39bf
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Mon Oct 1 14:34:17 2012 -0700
[2202] Merge branch 'trac2202' with the remote version.
fixing conflicts, apparently due to a missing push:
src/lib/util/threads/tests/lock_unittest.cc
commit dcde0c0b983dd0ce788d7273f0cf7e02b37a711d
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Sep 28 15:10:32 2012 -0700
[2202] small style fixes
- long/short lines
- position of ++/--
- spacing
- namespace
commit 46c77cb971eeb52802fba8091529c9947bfda05c
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Sep 28 13:03:07 2012 -0700
[2202] editorial: fixed a typo in a comment
commit af3d7616a9f65bf3effb25d2432d0955dcb5d03b
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Sep 28 09:54:00 2012 -0700
[2202] added new util/threads directory to the doxygen input list.
-----------------------------------------------------------------------
Summary of changes:
doc/Doxyfile | 5 +++--
src/lib/util/threads/lock.h | 2 +-
src/lib/util/threads/tests/lock_unittest.cc | 10 +++++-----
src/lib/util/threads/tests/thread_unittest.cc | 5 ++---
src/lib/util/threads/thread.cc | 3 +--
5 files changed, 12 insertions(+), 13 deletions(-)
-----------------------------------------------------------------------
diff --git a/doc/Doxyfile b/doc/Doxyfile
index 7e122e9..f6b9fa0 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -579,8 +579,9 @@ INPUT = ../src/lib/exceptions ../src/lib/cc \
../src/lib/log/compiler ../src/lib/asiolink/ ../src/lib/nsas \
../src/lib/testutils ../src/lib/cache ../src/lib/server_common/ \
../src/bin/sockcreator/ ../src/lib/util/ ../src/lib/util/io/ \
- ../src/lib/resolve ../src/lib/acl ../src/bin/dhcp6 ../src/lib/dhcp \
- ../src/bin/dhcp4 ../tests/tools/perfdhcp devel
+ ../src/lib/util/threads/ ../src/lib/resolve ../src/lib/acl \
+ ../src/bin/dhcp6 ../src/lib/dhcp ../src/bin/dhcp4 \
+ ../tests/tools/perfdhcp devel
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
diff --git a/src/lib/util/threads/lock.h b/src/lib/util/threads/lock.h
index 75bff65..3717bd4 100644
--- a/src/lib/util/threads/lock.h
+++ b/src/lib/util/threads/lock.h
@@ -59,7 +59,7 @@ public:
/// \brief Destructor.
///
- /// Destroyes the mutex. It is not allowed to destroy a mutex which is
+ /// Destroys the mutex. It is not allowed to destroy a mutex which is
/// currently locked. This means a Locker created with this Mutex must
/// never live longer than the Mutex itself.
~Mutex();
diff --git a/src/lib/util/threads/tests/lock_unittest.cc b/src/lib/util/threads/tests/lock_unittest.cc
index d6579d8..ea8f6af 100644
--- a/src/lib/util/threads/tests/lock_unittest.cc
+++ b/src/lib/util/threads/tests/lock_unittest.cc
@@ -83,7 +83,7 @@ performStrangeOperation(std::vector<long long unsigned>& array, int direction,
Mutex* mutex)
{
unsigned long long position = 0;
- for (size_t i = 0; i < iterations; i ++) {
+ for (size_t i = 0; i < iterations; ++i) {
Mutex::Locker lock(*mutex);
// Find a place with large enough value
while (array[position % length] < value) {
@@ -99,8 +99,8 @@ performStrangeOperation(std::vector<long long unsigned>& array, int direction,
if (p2 % length == position % length) {
continue;
}
- array[p2 % length] ++;
- found_value --;
+ ++array[p2 % length];
+ --found_value;
}
// Zero the distributed value
array[position % length] = 0;
@@ -122,7 +122,7 @@ TEST(MutexTest, swarm) {
// This type has a low chance of being atomic itself, further raising
// the chance of problems appearing.
std::vector<long long unsigned> array(length);
- for (size_t i = 0; i < length; ++ i) {
+ for (size_t i = 0; i < length; ++i) {
array[i] = value;
}
Mutex mutex;
@@ -133,7 +133,7 @@ TEST(MutexTest, swarm) {
t2.wait();
// Check the sum didn't change.
long long unsigned sum = 0;
- for (size_t i = 0; i < length; ++ i) {
+ for (size_t i = 0; i < length; ++i) {
sum += array[i];
}
EXPECT_EQ(length * value, sum) << "Threads are badly synchronized";
diff --git a/src/lib/util/threads/tests/thread_unittest.cc b/src/lib/util/threads/tests/thread_unittest.cc
index 5f95d61..5afdf3f 100644
--- a/src/lib/util/threads/tests/thread_unittest.cc
+++ b/src/lib/util/threads/tests/thread_unittest.cc
@@ -29,12 +29,11 @@
// started in parallel (the other tests wait for the previous one to terminate
// before starting new one).
-const size_t iterations = 200;
-const size_t detached_iterations = 25;
-
using namespace isc::util::thread;
namespace {
+const size_t iterations = 200;
+const size_t detached_iterations = 25;
void
doSomething(int*) { }
diff --git a/src/lib/util/threads/thread.cc b/src/lib/util/threads/thread.cc
index 87bce4c..ba3bfc6 100644
--- a/src/lib/util/threads/thread.cc
+++ b/src/lib/util/threads/thread.cc
@@ -125,8 +125,7 @@ Thread::~Thread() {
const int result = pthread_detach(impl_->tid_);
Impl::done(impl_);
impl_ = NULL;
- // If the detach ever fails, something is screwed rather
- // badly.
+ // If the detach ever fails, something is screwed rather badly.
assert(result == 0);
}
}
More information about the bind10-changes
mailing list