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

Unified Diff: src/futex-emulation.h

Issue 2143443002: [Atomics] Rename Atomics.futex*, remove Atomics.futexWakeOrRequeue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge master Created 4 years, 5 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 | 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 9949bdf44ff68aef6ef72099aa2a9d8e0f3fb7ea..a0e2b18bdc2cc3d24c966a8346f57e62e105f945 100644
--- a/src/futex-emulation.h
+++ b/src/futex-emulation.h
@@ -21,7 +21,7 @@
// variables for consistency.
//
// This is used by the Futex API defined in the SharedArrayBuffer draft spec,
-// found here: https://github.com/lars-t-hansen/ecmascript_sharedmem
+// found here: https://github.com/tc39/ecmascript_sharedmem
namespace v8 {
@@ -81,18 +81,11 @@ class FutexWaitList {
class FutexEmulation : public AllStatic {
public:
- // These must match the values in src/harmony-atomics.js
- enum Result {
- kOk = 0,
- kNotEqual = -1,
- kTimedOut = -2,
- };
-
- // Check that array_buffer[addr] == value, and return kNotEqual if not. If
+ // Check that array_buffer[addr] == value, and return "not-equal" if not. If
// they are equal, block execution on |isolate|'s thread until woken via
// |Wake|, or when the time given in |rel_timeout_ms| elapses. Note that
// |rel_timeout_ms| can be Infinity.
- // If woken, return kOk, otherwise return kTimedOut. The initial check and
+ // If woken, return "ok", otherwise return "timed-out". The initial check and
// the decision to wait happen atomically.
static Object* Wait(Isolate* isolate, Handle<JSArrayBuffer> array_buffer,
size_t addr, int32_t value, double rel_timeout_ms);
@@ -103,16 +96,6 @@ class FutexEmulation : public AllStatic {
static Object* Wake(Isolate* isolate, Handle<JSArrayBuffer> array_buffer,
size_t addr, int num_waiters_to_wake);
- // Check that array_buffer[addr] == value, and return kNotEqual if not. If
- // they are equal, wake |num_waiters_to_wake| threads that are waiting on the
- // given |addr|. The rest of the waiters will continue to wait, but will now
- // be waiting on |addr2| instead of |addr|. The return value is the number of
- // woken waiters or kNotEqual as described above.
- static Object* WakeOrRequeue(Isolate* isolate,
- Handle<JSArrayBuffer> array_buffer, size_t addr,
- int num_waiters_to_wake, int32_t value,
- size_t addr2);
-
// Return the number of threads waiting on |addr|. Should only be used for
// testing.
static Object* NumWaitersForTesting(Isolate* isolate,
« no previous file with comments | « no previous file | src/futex-emulation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698