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

Side by Side Diff: webrtc/rtc_base/criticalsection_unittest.cc

Issue 3006133002: Update thread annotiation macros in rtc_base to use RTC_ prefix (Closed)
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « webrtc/rtc_base/criticalsection.cc ('k') | webrtc/rtc_base/event_tracer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 return false; 107 return false;
108 } 108 }
109 109
110 int threads_active_; 110 int threads_active_;
111 Event start_event_; 111 Event start_event_;
112 Event done_event_; 112 Event done_event_;
113 int shared_value_; 113 int shared_value_;
114 }; 114 };
115 115
116 class LOCKABLE CriticalSectionLock { 116 class RTC_LOCKABLE CriticalSectionLock {
117 public: 117 public:
118 void Lock() EXCLUSIVE_LOCK_FUNCTION() { 118 void Lock() RTC_EXCLUSIVE_LOCK_FUNCTION() { cs_.Enter(); }
119 cs_.Enter(); 119 void Unlock() RTC_UNLOCK_FUNCTION() { cs_.Leave(); }
120 }
121 void Unlock() UNLOCK_FUNCTION() {
122 cs_.Leave();
123 }
124 120
125 private: 121 private:
126 CriticalSection cs_; 122 CriticalSection cs_;
127 }; 123 };
128 124
129 template <class Lock> 125 template <class Lock>
130 class LockRunner : public RunnerBase { 126 class LockRunner : public RunnerBase {
131 public: 127 public:
132 LockRunner() : RunnerBase(0) {} 128 LockRunner() : RunnerBase(0) {}
133 129
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 for (auto& t : threads) 400 for (auto& t : threads)
405 t.Start(&test_data, kThreadRepeats, 1); 401 t.Start(&test_data, kThreadRepeats, 1);
406 402
407 event.Wait(Event::kForever); 403 event.Wait(Event::kForever);
408 404
409 for (auto& t : threads) 405 for (auto& t : threads)
410 t.Stop(); 406 t.Stop();
411 } 407 }
412 408
413 } // namespace rtc 409 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/rtc_base/criticalsection.cc ('k') | webrtc/rtc_base/event_tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698