diff options
author | deanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 12:22:42 +0000 |
---|---|---|
committer | deanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 12:22:42 +0000 |
commit | db45a2f85588f7b1c1d62fe103c80a4eebca4e15 (patch) | |
tree | 8eab6845d0fec72b3178813699e72039d1382e87 | |
parent | 45d69a2e92ebc98008c06ea1b6256835c236ea39 (diff) | |
download | chromium_src-db45a2f85588f7b1c1d62fe103c80a4eebca4e15.zip chromium_src-db45a2f85588f7b1c1d62fe103c80a4eebca4e15.tar.gz chromium_src-db45a2f85588f7b1c1d62fe103c80a4eebca4e15.tar.bz2 |
Remove the LOCKED_EXPRESSION macro, it's clumbsy and unused.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@506 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/condition_variable_test.cc | 15 | ||||
-rw-r--r-- | base/lock.h | 8 |
2 files changed, 0 insertions, 23 deletions
diff --git a/base/condition_variable_test.cc b/base/condition_variable_test.cc index 35efa5f..bfbdb4e4 100644 --- a/base/condition_variable_test.cc +++ b/base/condition_variable_test.cc @@ -235,21 +235,6 @@ TEST_F(ConditionVariableTest, StartupShutdownTest) { lock.Release(); } // Call for cv destruction. -TEST_F(ConditionVariableTest, LockedExpressionTest) { - int i = 0; - Lock lock; - - // Old LOCKED_EXPRESSION macro caused syntax errors here. - // ... yes... compiler will optimize this example. - // Syntax error is what I'm after precluding. - if (0) - LOCKED_EXPRESSION(lock, i = 1); - else - LOCKED_EXPRESSION(lock, i = 2); - - EXPECT_EQ(2, i); -} - TEST_F(ConditionVariableTest, TimeoutTest) { Lock lock; ConditionVariable cv(&lock); diff --git a/base/lock.h b/base/lock.h index 9613da0..59b0aea 100644 --- a/base/lock.h +++ b/base/lock.h @@ -88,14 +88,6 @@ class AutoLock { DISALLOW_EVIL_CONSTRUCTORS(AutoLock); }; -// A helper macro to perform a single operation (expressed by expr) -// in a lock -#define LOCKED_EXPRESSION(lock, expr) \ - do { \ - AutoLock _auto_lock(lock); \ - (expr); \ - } while (0) - // AutoUnlock is a helper class for ConditionVariable instances // that is analogous to AutoLock. It provides for nested Releases // of a lock for the Wait functionality of a ConditionVariable class. |