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

Unified Diff: webrtc/system_wrappers/source/event_timer_posix.h

Issue 1812533002: Fix race condition in EventTimerPosix (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed race in test code Created 4 years, 9 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 | « no previous file | webrtc/system_wrappers/source/event_timer_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/event_timer_posix.h
diff --git a/webrtc/system_wrappers/source/event_timer_posix.h b/webrtc/system_wrappers/source/event_timer_posix.h
index bbf51f72db7b36c10ad412fa7f630f8ecec62d0b..9ca8ba25dedf2229e9c4b0fa9d959bb0bb56562d 100644
--- a/webrtc/system_wrappers/source/event_timer_posix.h
+++ b/webrtc/system_wrappers/source/event_timer_posix.h
@@ -39,9 +39,10 @@ class EventTimerPosix : public EventTimerWrapper {
private:
static bool Run(void* obj);
bool Process();
- EventTypeWrapper Wait(timespec* end_at);
+ EventTypeWrapper Wait(timespec* end_at, bool reset_state);
+
+ virtual rtc::PlatformThread* CreateThread();
- private:
pthread_cond_t cond_;
pthread_mutex_t mutex_;
bool event_set_;
@@ -52,8 +53,11 @@ class EventTimerPosix : public EventTimerWrapper {
timespec created_at_;
bool periodic_;
- unsigned long time_; // In ms
+ unsigned long time_ms_;
unsigned long count_;
+ bool is_stopping_;
+
+ friend class EventTimerPosixTest;
mflodman 2016/03/18 09:19:23 This is normally put directly on the line after 'p
sprang_webrtc 2016/03/18 09:24:28 Done.
};
} // namespace webrtc
« no previous file with comments | « no previous file | webrtc/system_wrappers/source/event_timer_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698