UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FWindowsPlatformAtomics Struct Reference

#include <WindowsPlatformAtomics.h>

+ Inheritance diagram for FWindowsPlatformAtomics:

Static Public Member Functions

static FORCEINLINE int8 InterlockedIncrement (volatile int8 *Value)
 
static FORCEINLINE int16 InterlockedIncrement (volatile int16 *Value)
 
static FORCEINLINE int32 InterlockedIncrement (volatile int32 *Value)
 
static FORCEINLINE int64 InterlockedIncrement (volatile int64 *Value)
 
static FORCEINLINE int8 InterlockedDecrement (volatile int8 *Value)
 
static FORCEINLINE int16 InterlockedDecrement (volatile int16 *Value)
 
static FORCEINLINE int32 InterlockedDecrement (volatile int32 *Value)
 
static FORCEINLINE int64 InterlockedDecrement (volatile int64 *Value)
 
static FORCEINLINE int8 InterlockedAdd (volatile int8 *Value, int8 Amount)
 
static FORCEINLINE int16 InterlockedAdd (volatile int16 *Value, int16 Amount)
 
static FORCEINLINE int32 InterlockedAdd (volatile int32 *Value, int32 Amount)
 
static FORCEINLINE int64 InterlockedAdd (volatile int64 *Value, int64 Amount)
 
static FORCEINLINE int8 InterlockedExchange (volatile int8 *Value, int8 Exchange)
 
static FORCEINLINE int16 InterlockedExchange (volatile int16 *Value, int16 Exchange)
 
static FORCEINLINE int32 InterlockedExchange (volatile int32 *Value, int32 Exchange)
 
static FORCEINLINE int64 InterlockedExchange (volatile int64 *Value, int64 Exchange)
 
static FORCEINLINE voidInterlockedExchangePtr (void *volatile *Dest, void *Exchange)
 
static FORCEINLINE int8 InterlockedCompareExchange (volatile int8 *Dest, int8 Exchange, int8 Comparand)
 
static FORCEINLINE int16 InterlockedCompareExchange (volatile int16 *Dest, int16 Exchange, int16 Comparand)
 
static FORCEINLINE int32 InterlockedCompareExchange (volatile int32 *Dest, int32 Exchange, int32 Comparand)
 
static FORCEINLINE int64 InterlockedCompareExchange (volatile int64 *Dest, int64 Exchange, int64 Comparand)
 
static FORCEINLINE int8 InterlockedAnd (volatile int8 *Value, const int8 AndValue)
 
static FORCEINLINE int16 InterlockedAnd (volatile int16 *Value, const int16 AndValue)
 
static FORCEINLINE int32 InterlockedAnd (volatile int32 *Value, const int32 AndValue)
 
static FORCEINLINE int64 InterlockedAnd (volatile int64 *Value, const int64 AndValue)
 
static FORCEINLINE int8 InterlockedOr (volatile int8 *Value, const int8 OrValue)
 
static FORCEINLINE int16 InterlockedOr (volatile int16 *Value, const int16 OrValue)
 
static FORCEINLINE int32 InterlockedOr (volatile int32 *Value, const int32 OrValue)
 
static FORCEINLINE int64 InterlockedOr (volatile int64 *Value, const int64 OrValue)
 
static FORCEINLINE int8 InterlockedXor (volatile int8 *Value, const int8 XorValue)
 
static FORCEINLINE int16 InterlockedXor (volatile int16 *Value, const int16 XorValue)
 
static FORCEINLINE int32 InterlockedXor (volatile int32 *Value, const int32 XorValue)
 
static FORCEINLINE int64 InterlockedXor (volatile int64 *Value, const int64 XorValue)
 
static FORCEINLINE int8 AtomicRead (volatile const int8 *Src)
 
static FORCEINLINE int16 AtomicRead (volatile const int16 *Src)
 
static FORCEINLINE int32 AtomicRead (volatile const int32 *Src)
 
static FORCEINLINE int64 AtomicRead (volatile const int64 *Src)
 
static FORCEINLINE int8 AtomicRead_Relaxed (volatile const int8 *Src)
 
static FORCEINLINE int16 AtomicRead_Relaxed (volatile const int16 *Src)
 
static FORCEINLINE int32 AtomicRead_Relaxed (volatile const int32 *Src)
 
static FORCEINLINE int64 AtomicRead_Relaxed (volatile const int64 *Src)
 
static FORCEINLINE void AtomicStore (volatile int8 *Src, int8 Val)
 
static FORCEINLINE void AtomicStore (volatile int16 *Src, int16 Val)
 
static FORCEINLINE void AtomicStore (volatile int32 *Src, int32 Val)
 
static FORCEINLINE void AtomicStore (volatile int64 *Src, int64 Val)
 
static FORCEINLINE void AtomicStore_Relaxed (volatile int8 *Src, int8 Val)
 
static FORCEINLINE void AtomicStore_Relaxed (volatile int16 *Src, int16 Val)
 
static FORCEINLINE void AtomicStore_Relaxed (volatile int32 *Src, int32 Val)
 
static FORCEINLINE void AtomicStore_Relaxed (volatile int64 *Src, int64 Val)
 
static FORCEINLINE voidInterlockedCompareExchangePointer (void *volatile *Dest, void *Exchange, void *Comparand)
 
static FORCEINLINE bool CanUseCompareExchange128 ()
 
- Static Public Member Functions inherited from FGenericPlatformAtomics
static FORCEINLINE bool CanUseCompareExchange128 ()
 

Static Protected Member Functions

static CORE_API void HandleAtomicsFailure (const TCHAR *InFormat,...)
 
- Static Protected Member Functions inherited from FGenericPlatformAtomics
static bool IsAligned (const volatile void *Ptr, const uint32 Alignment=sizeof(void *))
 

Detailed Description

Windows implementation of the Atomics OS functions

Member Function Documentation

◆ AtomicRead() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::AtomicRead ( volatile const int16 Src)
inlinestatic

◆ AtomicRead() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::AtomicRead ( volatile const int32 Src)
inlinestatic

◆ AtomicRead() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::AtomicRead ( volatile const int64 Src)
inlinestatic

◆ AtomicRead() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::AtomicRead ( volatile const int8 Src)
inlinestatic

◆ AtomicRead_Relaxed() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::AtomicRead_Relaxed ( volatile const int16 Src)
inlinestatic

◆ AtomicRead_Relaxed() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::AtomicRead_Relaxed ( volatile const int32 Src)
inlinestatic

◆ AtomicRead_Relaxed() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::AtomicRead_Relaxed ( volatile const int64 Src)
inlinestatic

◆ AtomicRead_Relaxed() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::AtomicRead_Relaxed ( volatile const int8 Src)
inlinestatic

◆ AtomicStore() [1/4]

static FORCEINLINE void FWindowsPlatformAtomics::AtomicStore ( volatile int16 Src,
int16  Val 
)
inlinestatic

◆ AtomicStore() [2/4]

static FORCEINLINE void FWindowsPlatformAtomics::AtomicStore ( volatile int32 Src,
int32  Val 
)
inlinestatic

◆ AtomicStore() [3/4]

static FORCEINLINE void FWindowsPlatformAtomics::AtomicStore ( volatile int64 Src,
int64  Val 
)
inlinestatic

◆ AtomicStore() [4/4]

static FORCEINLINE void FWindowsPlatformAtomics::AtomicStore ( volatile int8 Src,
int8  Val 
)
inlinestatic

◆ AtomicStore_Relaxed() [1/4]

static FORCEINLINE void FWindowsPlatformAtomics::AtomicStore_Relaxed ( volatile int16 Src,
int16  Val 
)
inlinestatic

◆ AtomicStore_Relaxed() [2/4]

static FORCEINLINE void FWindowsPlatformAtomics::AtomicStore_Relaxed ( volatile int32 Src,
int32  Val 
)
inlinestatic

◆ AtomicStore_Relaxed() [3/4]

static FORCEINLINE void FWindowsPlatformAtomics::AtomicStore_Relaxed ( volatile int64 Src,
int64  Val 
)
inlinestatic

◆ AtomicStore_Relaxed() [4/4]

static FORCEINLINE void FWindowsPlatformAtomics::AtomicStore_Relaxed ( volatile int8 Src,
int8  Val 
)
inlinestatic

◆ CanUseCompareExchange128()

static FORCEINLINE bool FWindowsPlatformAtomics::CanUseCompareExchange128 ( )
inlinestatic
Returns
true, if the processor we are running on can execute compare and exchange 128-bit operation.
See also
cmpxchg16b, early AMD64 processors don't support this operation.

◆ HandleAtomicsFailure()

void FWindowsPlatformAtomics::HandleAtomicsFailure ( const TCHAR InFormat,
  ... 
)
staticprotected

Handles atomics function failure.

Since 'check' has not yet been declared here we need to call external function to use it.

Parameters
InFormat- The string format string.

◆ InterlockedAdd() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::InterlockedAdd ( volatile int16 Value,
int16  Amount 
)
inlinestatic

◆ InterlockedAdd() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::InterlockedAdd ( volatile int32 Value,
int32  Amount 
)
inlinestatic

◆ InterlockedAdd() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::InterlockedAdd ( volatile int64 Value,
int64  Amount 
)
inlinestatic

◆ InterlockedAdd() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::InterlockedAdd ( volatile int8 Value,
int8  Amount 
)
inlinestatic

◆ InterlockedAnd() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::InterlockedAnd ( volatile int16 Value,
const int16  AndValue 
)
inlinestatic

◆ InterlockedAnd() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::InterlockedAnd ( volatile int32 Value,
const int32  AndValue 
)
inlinestatic

◆ InterlockedAnd() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::InterlockedAnd ( volatile int64 Value,
const int64  AndValue 
)
inlinestatic

◆ InterlockedAnd() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::InterlockedAnd ( volatile int8 Value,
const int8  AndValue 
)
inlinestatic

◆ InterlockedCompareExchange() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::InterlockedCompareExchange ( volatile int16 Dest,
int16  Exchange,
int16  Comparand 
)
inlinestatic

◆ InterlockedCompareExchange() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::InterlockedCompareExchange ( volatile int32 Dest,
int32  Exchange,
int32  Comparand 
)
inlinestatic

◆ InterlockedCompareExchange() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::InterlockedCompareExchange ( volatile int64 Dest,
int64  Exchange,
int64  Comparand 
)
inlinestatic

◆ InterlockedCompareExchange() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::InterlockedCompareExchange ( volatile int8 Dest,
int8  Exchange,
int8  Comparand 
)
inlinestatic

◆ InterlockedCompareExchangePointer()

static FORCEINLINE void * FWindowsPlatformAtomics::InterlockedCompareExchangePointer ( void *volatile Dest,
void Exchange,
void Comparand 
)
inlinestatic

The function compares the Destination value with the Comparand value:

  • If the Destination value is equal to the Comparand value, the Exchange value is stored in the address specified by Destination,
  • Otherwise, the initial value of the Destination parameter is stored in the address specified specified by Comparand.
Returns
true if Comparand equals the original value of the Destination parameter, or false if Comparand does not equal the original value of the Destination parameter.

Early AMD64 processors lacked the CMPXCHG16B instruction. To determine whether the processor supports this operation, call the IsProcessorFeaturePresent function with PF_COMPARE64_EXCHANGE128.

◆ InterlockedDecrement() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::InterlockedDecrement ( volatile int16 Value)
inlinestatic

◆ InterlockedDecrement() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::InterlockedDecrement ( volatile int32 Value)
inlinestatic

◆ InterlockedDecrement() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::InterlockedDecrement ( volatile int64 Value)
inlinestatic

◆ InterlockedDecrement() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::InterlockedDecrement ( volatile int8 Value)
inlinestatic

◆ InterlockedExchange() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::InterlockedExchange ( volatile int16 Value,
int16  Exchange 
)
inlinestatic

◆ InterlockedExchange() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::InterlockedExchange ( volatile int32 Value,
int32  Exchange 
)
inlinestatic

◆ InterlockedExchange() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::InterlockedExchange ( volatile int64 Value,
int64  Exchange 
)
inlinestatic

◆ InterlockedExchange() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::InterlockedExchange ( volatile int8 Value,
int8  Exchange 
)
inlinestatic

◆ InterlockedExchangePtr()

static FORCEINLINE void * FWindowsPlatformAtomics::InterlockedExchangePtr ( void *volatile Dest,
void Exchange 
)
inlinestatic

◆ InterlockedIncrement() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::InterlockedIncrement ( volatile int16 Value)
inlinestatic

◆ InterlockedIncrement() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::InterlockedIncrement ( volatile int32 Value)
inlinestatic

◆ InterlockedIncrement() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::InterlockedIncrement ( volatile int64 Value)
inlinestatic

◆ InterlockedIncrement() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::InterlockedIncrement ( volatile int8 Value)
inlinestatic

◆ InterlockedOr() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::InterlockedOr ( volatile int16 Value,
const int16  OrValue 
)
inlinestatic

◆ InterlockedOr() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::InterlockedOr ( volatile int32 Value,
const int32  OrValue 
)
inlinestatic

◆ InterlockedOr() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::InterlockedOr ( volatile int64 Value,
const int64  OrValue 
)
inlinestatic

◆ InterlockedOr() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::InterlockedOr ( volatile int8 Value,
const int8  OrValue 
)
inlinestatic

◆ InterlockedXor() [1/4]

static FORCEINLINE int16 FWindowsPlatformAtomics::InterlockedXor ( volatile int16 Value,
const int16  XorValue 
)
inlinestatic

◆ InterlockedXor() [2/4]

static FORCEINLINE int32 FWindowsPlatformAtomics::InterlockedXor ( volatile int32 Value,
const int32  XorValue 
)
inlinestatic

◆ InterlockedXor() [3/4]

static FORCEINLINE int64 FWindowsPlatformAtomics::InterlockedXor ( volatile int64 Value,
const int64  XorValue 
)
inlinestatic

◆ InterlockedXor() [4/4]

static FORCEINLINE int8 FWindowsPlatformAtomics::InterlockedXor ( volatile int8 Value,
const int8  XorValue 
)
inlinestatic

The documentation for this struct was generated from the following files: