atomic_ops.h 594 B

1234567891011121314151617
  1. // Copyright 2020 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "common/common_types.h"
  6. namespace Common {
  7. bool AtomicCompareAndSwap(volatile u8* pointer, u8 value, u8 expected);
  8. bool AtomicCompareAndSwap(volatile u16* pointer, u16 value, u16 expected);
  9. bool AtomicCompareAndSwap(volatile u32* pointer, u32 value, u32 expected);
  10. bool AtomicCompareAndSwap(volatile u64* pointer, u64 value, u64 expected);
  11. bool AtomicCompareAndSwap(volatile u64* pointer, u128 value, u128 expected);
  12. } // namespace Common