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

Unified Diff: runtime/bin/thread_fuchsia.cc

Issue 2916313003: [Fuchsia] Enable CPU profiling for the standalone VM (Closed)
Patch Set: Created 3 years, 7 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 | runtime/vm/flag_list.h » ('j') | runtime/vm/thread_interrupter_fuchsia.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/thread_fuchsia.cc
diff --git a/runtime/bin/thread_fuchsia.cc b/runtime/bin/thread_fuchsia.cc
index 5a9b35103af78bad7c7cc95655928cbb3e2418bb..5b458d29d4af8dc2dc20ecee9ccc9c5f8875040c 100644
--- a/runtime/bin/thread_fuchsia.cc
+++ b/runtime/bin/thread_fuchsia.cc
@@ -290,7 +290,12 @@ Monitor::WaitResult Monitor::WaitMicros(int64_t micros) {
Monitor::WaitResult retval = kNotified;
if (micros == kNoTimeout) {
// Wait forever.
- int result = pthread_cond_wait(data_.cond(), data_.mutex());
+ int result;
+ do {
+ result = pthread_cond_wait(data_.cond(), data_.mutex());
+ // TODO(MG-795): Disallow ETIMEDOUT when pthread_cond_wait() can no longer
+ // return it.
+ } while (result == ETIMEDOUT);
VALIDATE_PTHREAD_RESULT(result);
} else {
struct timespec ts;
« no previous file with comments | « no previous file | runtime/vm/flag_list.h » ('j') | runtime/vm/thread_interrupter_fuchsia.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698