// Copyright 2015 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_EXECUTION_FUTEX_EMULATION_H_ #define V8_EXECUTION_FUTEX_EMULATION_H_ #include <stdint.h> #include "include/v8-persistent-handle.h" #include "src/base/atomicops.h" #include "src/base/macros.h" #include "src/base/platform/condition-variable.h" #include "src/base/platform/time.h" #include "src/tasks/cancelable-task.h" #include "src/utils/allocation.h" // Support for emulating futexes, a low-level synchronization primitive. They // are natively supported by Linux, but must be emulated for other platforms. // This library emulates them on all platforms using mutexes and condition // variables for consistency. // // This is used by the Futex API defined in the SharedArrayBuffer draft spec, // found here: https://github.com/tc39/ecmascript_sharedmem namespace v8 { class Promise; namespace base { class TimeDelta; } // namespace base namespace internal { class BackingStore; class FutexWaitList; class Isolate; class JSArrayBuffer; class AtomicsWaitWakeHandle { … }; class FutexWaitListNode { … }; class FutexEmulation : public AllStatic { … }; } // namespace internal } // namespace v8 #endif // V8_EXECUTION_FUTEX_EMULATION_H_