Delete unused class GlobalMutex

Bug: webrtc:13869
Change-Id: Id3655bdd24630b78e83b606291605a37129fd4bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258131
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36478}
This commit is contained in:
Niels Möller
2022-04-07 11:07:52 +02:00
committed by WebRTC LUCI CQ
parent ee8e9ccd1a
commit 5831afb832
4 changed files with 0 additions and 100 deletions

View File

@ -177,30 +177,5 @@ TEST(MutexTest, ProtectsSharedResourceWithMutexAndMutexLocker) {
EXPECT_EQ(0, runner.shared_value());
}
TEST(MutexTest, ProtectsSharedResourceWithGlobalMutexAndRawMutexLocker) {
std::vector<std::unique_ptr<Thread>> threads;
LockRunner<GlobalMutex, RawMutexLocker<GlobalMutex>> runner(absl::kConstInit);
StartThreads(threads, &runner);
runner.SetExpectedThreadCount(kNumThreads);
EXPECT_TRUE(runner.Run());
EXPECT_EQ(0, runner.shared_value());
}
TEST(MutexTest, ProtectsSharedResourceWithGlobalMutexAndMutexLocker) {
std::vector<std::unique_ptr<Thread>> threads;
LockRunner<GlobalMutex, MutexLockLocker<GlobalMutex, GlobalMutexLock>> runner(
absl::kConstInit);
StartThreads(threads, &runner);
runner.SetExpectedThreadCount(kNumThreads);
EXPECT_TRUE(runner.Run());
EXPECT_EQ(0, runner.shared_value());
}
TEST(MutexTest, GlobalMutexCanHaveStaticStorageDuration) {
ABSL_CONST_INIT static GlobalMutex global_lock(absl::kConstInit);
global_lock.Lock();
global_lock.Unlock();
}
} // namespace
} // namespace webrtc