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

Unified Diff: webrtc/system_wrappers/include/rw_lock_wrapper.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/thread_checker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/include/rw_lock_wrapper.h
diff --git a/webrtc/system_wrappers/include/rw_lock_wrapper.h b/webrtc/system_wrappers/include/rw_lock_wrapper.h
index 855ecffc71b82289f18973e2b8ae20eb694dba21..62e75b454722fad419d273d9460b871ab8d8e606 100644
--- a/webrtc/system_wrappers/include/rw_lock_wrapper.h
+++ b/webrtc/system_wrappers/include/rw_lock_wrapper.h
@@ -19,45 +19,41 @@
namespace webrtc {
-class LOCKABLE RWLockWrapper {
+class RTC_LOCKABLE RWLockWrapper {
public:
static RWLockWrapper* CreateRWLock();
virtual ~RWLockWrapper() {}
- virtual void AcquireLockExclusive() EXCLUSIVE_LOCK_FUNCTION() = 0;
- virtual void ReleaseLockExclusive() UNLOCK_FUNCTION() = 0;
+ virtual void AcquireLockExclusive() RTC_EXCLUSIVE_LOCK_FUNCTION() = 0;
+ virtual void ReleaseLockExclusive() RTC_UNLOCK_FUNCTION() = 0;
- virtual void AcquireLockShared() SHARED_LOCK_FUNCTION() = 0;
- virtual void ReleaseLockShared() UNLOCK_FUNCTION() = 0;
+ virtual void AcquireLockShared() RTC_SHARED_LOCK_FUNCTION() = 0;
+ virtual void ReleaseLockShared() RTC_UNLOCK_FUNCTION() = 0;
};
// RAII extensions of the RW lock. Prevents Acquire/Release missmatches and
// provides more compact locking syntax.
-class SCOPED_LOCKABLE ReadLockScoped {
+class RTC_SCOPED_LOCKABLE ReadLockScoped {
public:
- ReadLockScoped(RWLockWrapper& rw_lock) SHARED_LOCK_FUNCTION(rw_lock)
+ ReadLockScoped(RWLockWrapper& rw_lock) RTC_SHARED_LOCK_FUNCTION(rw_lock)
: rw_lock_(rw_lock) {
rw_lock_.AcquireLockShared();
}
- ~ReadLockScoped() UNLOCK_FUNCTION() {
- rw_lock_.ReleaseLockShared();
- }
+ ~ReadLockScoped() RTC_UNLOCK_FUNCTION() { rw_lock_.ReleaseLockShared(); }
private:
RWLockWrapper& rw_lock_;
};
-class SCOPED_LOCKABLE WriteLockScoped {
+class RTC_SCOPED_LOCKABLE WriteLockScoped {
public:
- WriteLockScoped(RWLockWrapper& rw_lock) EXCLUSIVE_LOCK_FUNCTION(rw_lock)
+ WriteLockScoped(RWLockWrapper& rw_lock) RTC_EXCLUSIVE_LOCK_FUNCTION(rw_lock)
: rw_lock_(rw_lock) {
rw_lock_.AcquireLockExclusive();
}
- ~WriteLockScoped() UNLOCK_FUNCTION() {
- rw_lock_.ReleaseLockExclusive();
- }
+ ~WriteLockScoped() RTC_UNLOCK_FUNCTION() { rw_lock_.ReleaseLockExclusive(); }
private:
RWLockWrapper& rw_lock_;
« no previous file with comments | « webrtc/rtc_base/thread_checker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698