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

Unified Diff: webrtc/base/thread_checker.h

Issue 2055473002: Moves macros ACCESS_ON/RUN_ON from thread_annotations to thread_checker (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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/base/thread_annotations.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/thread_checker.h
diff --git a/webrtc/base/thread_checker.h b/webrtc/base/thread_checker.h
index 265b2affcb7e15907ab4fce2167e1e73876cb7b5..3ae6e2c9f7f67514fddd3124bf3fc98b491c4226 100644
--- a/webrtc/base/thread_checker.h
+++ b/webrtc/base/thread_checker.h
@@ -173,6 +173,13 @@ class SCOPED_LOCKABLE AnnounceOnThread {
// rtc::scoped_ref_ptr<Encoder> encoder_;
// }
+// Document if a variable/field is not shared and should be accessed from
+// same thread/task queue.
+#define ACCESS_ON(x) THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
+
+// Document if a function expected to be called from same thread/task queue.
+#define RUN_ON(x) THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(x))
+
#define RTC_DCHECK_RUN_ON(thread_like_object) \
rtc::internal::AnnounceOnThread thread_announcer(thread_like_object); \
RTC_DCHECK(rtc::internal::AnnounceOnThread::IsCurrent(thread_like_object))
« no previous file with comments | « webrtc/base/thread_annotations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698