summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/condition_variable_test.cc15
-rw-r--r--base/lock.h8
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.