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

Unified Diff: src/futex-emulation.h

Issue 1230303005: Signal a blocked futex if the isolate is interrupted; don't busy-wait (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove atomic waiting_ Created 5 years, 4 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 | « src/execution.cc ('k') | src/futex-emulation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/futex-emulation.h
diff --git a/src/futex-emulation.h b/src/futex-emulation.h
index 86b5f78811b0a32a541e7e76f16daae7642e9e0d..e7e2230da203b680b5f15a5879dd8834736cafc6 100644
--- a/src/futex-emulation.h
+++ b/src/futex-emulation.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include "src/allocation.h"
+#include "src/base/atomicops.h"
#include "src/base/lazy-instance.h"
#include "src/base/macros.h"
#include "src/base/platform/condition-variable.h"
@@ -40,7 +41,10 @@ class FutexWaitListNode {
next_(nullptr),
backing_store_(nullptr),
wait_addr_(0),
- waiting_(false) {}
+ waiting_(false),
+ interrupted_(false) {}
+
+ void NotifyWake();
private:
friend class FutexEmulation;
@@ -52,6 +56,7 @@ class FutexWaitListNode {
void* backing_store_;
size_t wait_addr_;
bool waiting_;
+ bool interrupted_;
DISALLOW_COPY_AND_ASSIGN(FutexWaitListNode);
};
@@ -115,6 +120,8 @@ class FutexEmulation : public AllStatic {
size_t addr);
private:
+ friend class FutexWaitListNode;
+
static base::LazyMutex mutex_;
static base::LazyInstance<FutexWaitList>::type wait_list_;
};
« no previous file with comments | « src/execution.cc ('k') | src/futex-emulation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698