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

Unified Diff: webrtc/rtc_base/race_checker.h

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/messagequeue.cc ('k') | webrtc/rtc_base/sequenced_task_checker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/race_checker.h
diff --git a/webrtc/rtc_base/race_checker.h b/webrtc/rtc_base/race_checker.h
index b49db534e37724e4fad57299eebfd0033828b6f7..f0506c8437ca46cd1c0c03201c076a8e452b0167 100644
--- a/webrtc/rtc_base/race_checker.h
+++ b/webrtc/rtc_base/race_checker.h
@@ -23,14 +23,14 @@ class RaceCheckerScope;
// Best-effort race-checking implementation. This primitive uses no
// synchronization at all to be as-fast-as-possible in the non-racy case.
-class LOCKABLE RaceChecker {
+class RTC_LOCKABLE RaceChecker {
public:
friend class internal::RaceCheckerScope;
RaceChecker();
private:
- bool Acquire() const EXCLUSIVE_LOCK_FUNCTION();
- void Release() const UNLOCK_FUNCTION();
+ bool Acquire() const RTC_EXCLUSIVE_LOCK_FUNCTION();
+ void Release() const RTC_UNLOCK_FUNCTION();
// Volatile to prevent code being optimized away in Acquire()/Release().
mutable volatile int access_count_ = 0;
@@ -38,25 +38,25 @@ class LOCKABLE RaceChecker {
};
namespace internal {
-class SCOPED_LOCKABLE RaceCheckerScope {
+class RTC_SCOPED_LOCKABLE RaceCheckerScope {
public:
explicit RaceCheckerScope(const RaceChecker* race_checker)
- EXCLUSIVE_LOCK_FUNCTION(race_checker);
+ RTC_EXCLUSIVE_LOCK_FUNCTION(race_checker);
bool RaceDetected() const;
- ~RaceCheckerScope() UNLOCK_FUNCTION();
+ ~RaceCheckerScope() RTC_UNLOCK_FUNCTION();
private:
const RaceChecker* const race_checker_;
const bool race_check_ok_;
};
-class SCOPED_LOCKABLE RaceCheckerScopeDoNothing {
+class RTC_SCOPED_LOCKABLE RaceCheckerScopeDoNothing {
public:
explicit RaceCheckerScopeDoNothing(const RaceChecker* race_checker)
- EXCLUSIVE_LOCK_FUNCTION(race_checker) {}
+ RTC_EXCLUSIVE_LOCK_FUNCTION(race_checker) {}
- ~RaceCheckerScopeDoNothing() UNLOCK_FUNCTION() {}
+ ~RaceCheckerScopeDoNothing() RTC_UNLOCK_FUNCTION() {}
};
} // namespace internal
« no previous file with comments | « webrtc/rtc_base/messagequeue.cc ('k') | webrtc/rtc_base/sequenced_task_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698