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

#include <GenericPlatformAtomics.h>

+ Inheritance diagram for FGenericPlatformAtomics:

Static Public Member Functions

static FORCEINLINE bool CanUseCompareExchange128 ()
 

Static Protected Member Functions

static bool IsAligned (const volatile void *Ptr, const uint32 Alignment=sizeof(void *))
 

Detailed Description

DEPRECATED! UE atomics are not maintained and potentially will be physically deprecated. Use std::atomic<T> for new code

Generic implementation...you are required to implement at least FPlatformAtomics::InterlockedCompareExchange but they are listed here to provide a base implementation in terms of FPlatformAtomics::InterlockedCompareExchange and easy copy-paste

Member Function Documentation

◆ CanUseCompareExchange128()

static FORCEINLINE bool FGenericPlatformAtomics::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.

◆ IsAligned()

static bool FGenericPlatformAtomics::IsAligned ( const volatile void Ptr,
const uint32  Alignment = sizeof(void*) 
)
inlinestaticprotected

Checks if a pointer is aligned and can be used with atomic functions.

Parameters
Ptr- The pointer to check.
Returns
true if the pointer is aligned, false otherwise.

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