elemental2.core.Atomics Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package elemental2.core;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class Atomics {
public static native double add(TypedArray typedArray, int index, double value);
public static native double and(TypedArray typedArray, int index, double value);
public static native double compareExchange(
TypedArray typedArray, int index, double expectedValue, double replacementValue);
public static native double exchange(TypedArray typedArray, int index, double value);
public static native boolean isLockFree(int size);
public static native double load(TypedArray typedArray, int index);
public static native double notify(Int32Array typedArray, double index, double count);
public static native double notify(Int32Array typedArray, double index);
public static native double or(TypedArray typedArray, int index, double value);
public static native double store(TypedArray typedArray, int index, double value);
public static native double sub(TypedArray typedArray, int index, double value);
public static native JsString wait(
Int32Array typedArray, int index, double value, double timeout);
public static native JsString wait(Int32Array typedArray, int index, double value);
public static native double wake(Int32Array typedArray, int index, double count);
public static native double wake(Int32Array typedArray, int index);
public static native double xor(TypedArray typedArray, int index, double value);
}