summaryrefslogtreecommitdiffstats
path: root/runtime/base
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-07-17 22:39:56 -0700
committerBrian Carlstrom <bdc@google.com>2013-07-18 00:13:18 -0700
commitdf62950e7a32031b82360c407d46a37b94188fbb (patch)
tree038bf95a2ce296ae3e0c30a131ac22c0986f0f52 /runtime/base
parent0cd7ec2dcd8d7ba30bf3ca420b40dac52849876c (diff)
downloadart-df62950e7a32031b82360c407d46a37b94188fbb.zip
art-df62950e7a32031b82360c407d46a37b94188fbb.tar.gz
art-df62950e7a32031b82360c407d46a37b94188fbb.tar.bz2
Fix cpplint whitespace/parens issues
Change-Id: Ifc678d59a8bed24ffddde5a0e543620b17b0aba9
Diffstat (limited to 'runtime/base')
-rw-r--r--runtime/base/mutex-inl.h4
-rw-r--r--runtime/base/mutex.cc16
2 files changed, 10 insertions, 10 deletions
diff --git a/runtime/base/mutex-inl.h b/runtime/base/mutex-inl.h
index 07157da..b3f5092 100644
--- a/runtime/base/mutex-inl.h
+++ b/runtime/base/mutex-inl.h
@@ -148,7 +148,7 @@ inline void ReaderWriterMutex::SharedLock(Thread* self) {
}
android_atomic_dec(&num_pending_readers_);
}
- } while(!done);
+ } while (!done);
#else
CHECK_MUTEX_CALL(pthread_rwlock_rdlock, (&rwlock_));
#endif
@@ -176,7 +176,7 @@ inline void ReaderWriterMutex::SharedUnlock(Thread* self) {
} else {
LOG(FATAL) << "Unexpected state_:" << cur_state << " for " << name_;
}
- } while(!done);
+ } while (!done);
#else
CHECK_MUTEX_CALL(pthread_rwlock_unlock, (&rwlock_));
#endif
diff --git a/runtime/base/mutex.cc b/runtime/base/mutex.cc
index 25c0b9e..1df0207 100644
--- a/runtime/base/mutex.cc
+++ b/runtime/base/mutex.cc
@@ -178,7 +178,7 @@ void BaseMutex::RecordContention(uint64_t blocked_tid, uint64_t owner_tid, uint6
do {
slot = cur_content_log_entry_;
new_slot = (slot + 1) % kContentionLogSize;
- } while(!cur_content_log_entry_.CompareAndSwap(slot, new_slot));
+ } while (!cur_content_log_entry_.CompareAndSwap(slot, new_slot));
contention_log_[new_slot].blocked_tid = blocked_tid;
contention_log_[new_slot].owner_tid = owner_tid;
contention_log_[new_slot].count = 1;
@@ -312,7 +312,7 @@ void Mutex::ExclusiveLock(Thread* self) {
}
android_atomic_dec(&num_contenders_);
}
- } while(!done);
+ } while (!done);
DCHECK_EQ(state_, 1);
exclusive_owner_ = SafeGetTid(self);
#else
@@ -344,7 +344,7 @@ bool Mutex::ExclusiveTryLock(Thread* self) {
} else {
return false;
}
- } while(!done);
+ } while (!done);
DCHECK_EQ(state_, 1);
exclusive_owner_ = SafeGetTid(self);
#else
@@ -404,7 +404,7 @@ void Mutex::ExclusiveUnlock(Thread* self) {
_exit(1);
}
}
- } while(!done);
+ } while (!done);
#else
CHECK_MUTEX_CALL(pthread_mutex_unlock, (&mutex_));
#endif
@@ -513,7 +513,7 @@ void ReaderWriterMutex::ExclusiveLock(Thread* self) {
}
android_atomic_dec(&num_pending_writers_);
}
- } while(!done);
+ } while (!done);
DCHECK_EQ(state_, -1);
exclusive_owner_ = SafeGetTid(self);
#else
@@ -545,7 +545,7 @@ void ReaderWriterMutex::ExclusiveUnlock(Thread* self) {
} else {
LOG(FATAL) << "Unexpected state_:" << cur_state << " for " << name_;
}
- } while(!done);
+ } while (!done);
#else
CHECK_MUTEX_CALL(pthread_rwlock_unlock, (&rwlock_));
#endif
@@ -583,7 +583,7 @@ bool ReaderWriterMutex::ExclusiveLockWithTimeout(Thread* self, int64_t ms, int32
}
android_atomic_dec(&num_pending_writers_);
}
- } while(!done);
+ } while (!done);
exclusive_owner_ = SafeGetTid(self);
#else
timespec ts;
@@ -616,7 +616,7 @@ bool ReaderWriterMutex::SharedTryLock(Thread* self) {
// Owner holds it exclusively.
return false;
}
- } while(!done);
+ } while (!done);
#else
int result = pthread_rwlock_tryrdlock(&rwlock_);
if (result == EBUSY) {