Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4100)

Unified Diff: base/synchronization/lock_unittest.cc

Issue 12741012: base: Support setting thread priorities generically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static initializers. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | base/threading/platform_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/lock_unittest.cc
diff --git a/base/synchronization/lock_unittest.cc b/base/synchronization/lock_unittest.cc
index e87571d0d85b164b9afdabad93d8eddb6ba92a5a..161447557fd9fb5922957af687505e114cdfe6d0 100644
--- a/base/synchronization/lock_unittest.cc
+++ b/base/synchronization/lock_unittest.cc
@@ -51,7 +51,7 @@ class BasicLockTestThread : public PlatformThread::Delegate {
TEST(LockTest, Basic) {
Lock lock;
BasicLockTestThread thread(&lock);
- PlatformThreadHandle handle = kNullThreadHandle;
+ PlatformThreadHandle handle;
ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle));
@@ -117,7 +117,7 @@ TEST(LockTest, TryLock) {
// This thread will not be able to get the lock.
{
TryLockTestThread thread(&lock);
- PlatformThreadHandle handle = kNullThreadHandle;
+ PlatformThreadHandle handle;
ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle));
@@ -131,7 +131,7 @@ TEST(LockTest, TryLock) {
// This thread will....
{
TryLockTestThread thread(&lock);
- PlatformThreadHandle handle = kNullThreadHandle;
+ PlatformThreadHandle handle;
ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle));
@@ -178,7 +178,7 @@ TEST(LockTest, MutexTwoThreads) {
int value = 0;
MutexLockTestThread thread(&lock, &value);
- PlatformThreadHandle handle = kNullThreadHandle;
+ PlatformThreadHandle handle;
ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle));
@@ -196,9 +196,9 @@ TEST(LockTest, MutexFourThreads) {
MutexLockTestThread thread1(&lock, &value);
MutexLockTestThread thread2(&lock, &value);
MutexLockTestThread thread3(&lock, &value);
- PlatformThreadHandle handle1 = kNullThreadHandle;
- PlatformThreadHandle handle2 = kNullThreadHandle;
- PlatformThreadHandle handle3 = kNullThreadHandle;
+ PlatformThreadHandle handle1;
+ PlatformThreadHandle handle2;
+ PlatformThreadHandle handle3;
ASSERT_TRUE(PlatformThread::Create(0, &thread1, &handle1));
ASSERT_TRUE(PlatformThread::Create(0, &thread2, &handle2));
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | base/threading/platform_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698