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

Unified Diff: webrtc/rtc_base/criticalsection.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/modules/audio_device/linux/audio_device_pulse_linux.h ('k') | webrtc/rtc_base/criticalsection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/criticalsection.h
diff --git a/webrtc/rtc_base/criticalsection.h b/webrtc/rtc_base/criticalsection.h
index 38172d7e0cc98924fea1fa7c684a5345d871e644..fb55aaf0d198ac0f967e2d04748239036ab9cb66 100644
--- a/webrtc/rtc_base/criticalsection.h
+++ b/webrtc/rtc_base/criticalsection.h
@@ -52,14 +52,14 @@ namespace rtc {
// Locking methods (Enter, TryEnter, Leave)are const to permit protecting
// members inside a const context without requiring mutable CriticalSections
// everywhere.
-class LOCKABLE CriticalSection {
+class RTC_LOCKABLE CriticalSection {
public:
CriticalSection();
~CriticalSection();
- void Enter() const EXCLUSIVE_LOCK_FUNCTION();
- bool TryEnter() const EXCLUSIVE_TRYLOCK_FUNCTION(true);
- void Leave() const UNLOCK_FUNCTION();
+ void Enter() const RTC_EXCLUSIVE_LOCK_FUNCTION();
+ bool TryEnter() const RTC_EXCLUSIVE_TRYLOCK_FUNCTION(true);
+ void Leave() const RTC_UNLOCK_FUNCTION();
private:
// Use only for RTC_DCHECKing.
@@ -91,10 +91,11 @@ class LOCKABLE CriticalSection {
};
// CritScope, for serializing execution through a scope.
-class SCOPED_LOCKABLE CritScope {
+class RTC_SCOPED_LOCKABLE CritScope {
public:
- explicit CritScope(const CriticalSection* cs) EXCLUSIVE_LOCK_FUNCTION(cs);
- ~CritScope() UNLOCK_FUNCTION();
+ explicit CritScope(const CriticalSection* cs) RTC_EXCLUSIVE_LOCK_FUNCTION(cs);
+ ~CritScope() RTC_UNLOCK_FUNCTION();
+
private:
const CriticalSection* const cs_;
RTC_DISALLOW_COPY_AND_ASSIGN(CritScope);
@@ -127,11 +128,11 @@ class TryCritScope {
// A POD lock used to protect global variables. Do NOT use for other purposes.
// No custom constructor or private data member should be added.
-class LOCKABLE GlobalLockPod {
+class RTC_LOCKABLE GlobalLockPod {
public:
- void Lock() EXCLUSIVE_LOCK_FUNCTION();
+ void Lock() RTC_EXCLUSIVE_LOCK_FUNCTION();
- void Unlock() UNLOCK_FUNCTION();
+ void Unlock() RTC_UNLOCK_FUNCTION();
volatile int lock_acquired;
};
@@ -142,10 +143,12 @@ class GlobalLock : public GlobalLockPod {
};
// GlobalLockScope, for serializing execution through a scope.
-class SCOPED_LOCKABLE GlobalLockScope {
+class RTC_SCOPED_LOCKABLE GlobalLockScope {
public:
- explicit GlobalLockScope(GlobalLockPod* lock) EXCLUSIVE_LOCK_FUNCTION(lock);
- ~GlobalLockScope() UNLOCK_FUNCTION();
+ explicit GlobalLockScope(GlobalLockPod* lock)
+ RTC_EXCLUSIVE_LOCK_FUNCTION(lock);
+ ~GlobalLockScope() RTC_UNLOCK_FUNCTION();
+
private:
GlobalLockPod* const lock_;
RTC_DISALLOW_COPY_AND_ASSIGN(GlobalLockScope);
« no previous file with comments | « webrtc/modules/audio_device/linux/audio_device_pulse_linux.h ('k') | webrtc/rtc_base/criticalsection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698