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

Unified Diff: webrtc/rtc_base/thread_annotations_unittest.cc

Issue 3004393002: Rename thread annotation macros to have RTC prefix for syncrhonization primitives. (Closed)
Patch Set: Created 3 years, 3 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 | « webrtc/rtc_base/thread_annotations.h ('k') | webrtc/rtc_base/thread_checker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/thread_annotations_unittest.cc
diff --git a/webrtc/rtc_base/thread_annotations_unittest.cc b/webrtc/rtc_base/thread_annotations_unittest.cc
index a8ff014eede0c3ce7865eddf4641db83570b4679..92fbafe052f20d0b39f110a71be216e9310c58b5 100644
--- a/webrtc/rtc_base/thread_annotations_unittest.cc
+++ b/webrtc/rtc_base/thread_annotations_unittest.cc
@@ -13,19 +13,21 @@
namespace {
-class LOCKABLE Lock {
+class RTC_LOCKABLE Lock {
public:
- void EnterWrite() const EXCLUSIVE_LOCK_FUNCTION() {}
- void EnterRead() const SHARED_LOCK_FUNCTION() {}
- bool TryEnterWrite() const EXCLUSIVE_TRYLOCK_FUNCTION(true) { return true; }
- bool TryEnterRead() const SHARED_TRYLOCK_FUNCTION(true) { return true; }
- void Leave() const UNLOCK_FUNCTION() {}
+ void EnterWrite() const RTC_EXCLUSIVE_LOCK_FUNCTION() {}
+ void EnterRead() const RTC_SHARED_LOCK_FUNCTION() {}
+ bool TryEnterWrite() const RTC_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
+ return true;
+ }
+ bool TryEnterRead() const RTC_SHARED_TRYLOCK_FUNCTION(true) { return true; }
+ void Leave() const RTC_UNLOCK_FUNCTION() {}
};
-class SCOPED_LOCKABLE ScopeLock {
+class RTC_SCOPED_LOCKABLE ScopeLock {
public:
- explicit ScopeLock(const Lock& lock) EXCLUSIVE_LOCK_FUNCTION(lock) {}
- ~ScopeLock() UNLOCK_FUNCTION() {}
+ explicit ScopeLock(const Lock& lock) RTC_EXCLUSIVE_LOCK_FUNCTION(lock) {}
+ ~ScopeLock() RTC_UNLOCK_FUNCTION() {}
};
class ThreadSafe {
@@ -121,7 +123,7 @@ class ThreadSafe {
protected_by_lock_ = unprotected_;
}
- const Lock& GetLock() LOCK_RETURNED(lock_) { return lock_; }
+ const Lock& GetLock() RTC_LOCK_RETURNED(lock_) { return lock_; }
Lock anylock_ ACQUIRED_BEFORE(lock_);
Lock lock_;
@@ -130,10 +132,10 @@ class ThreadSafe {
int unprotected_ = 0;
int protected_by_lock_ GUARDED_BY(lock_) = 0;
- int protected_by_anything_ GUARDED_VAR = 0;
+ int protected_by_anything_ RTC_GUARDED_VAR = 0;
- int* pt_protected_by_lock_ PT_GUARDED_BY(pt_lock_);
- int* pt_protected_by_anything_ PT_GUARDED_VAR;
+ int* pt_protected_by_lock_ RTC_PT_GUARDED_BY(pt_lock_);
+ int* pt_protected_by_anything_ RTC_PT_GUARDED_VAR;
};
} // namespace
« no previous file with comments | « webrtc/rtc_base/thread_annotations.h ('k') | webrtc/rtc_base/thread_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698