//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- // Implements Atomics according to http://tc39.github.io/ecmascript_sharedmem/shmem.html //---------------------------------------------------------------------------- #pragma once namespace Js { class AtomicsOperations { public: template static T Load(T* buffer); template static T Store(T* buffer, T value); template static T Add(T* buffer, T value); template static T And(T* buffer, T value); template static T CompareExchange(T* buffer, T comparand, T replacementValue); template static T Exchange(T* buffer, T value); template static T Or(T* buffer, T value); template static T Sub(T* buffer, T value); template static T Xor(T* buffer, T value); }; }