Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
FWindowsPlatformAtomics Struct Reference

#include <WindowsPlatformAtomics.h>

+ Inheritance diagram for FWindowsPlatformAtomics:
+ Collaboration diagram for FWindowsPlatformAtomics:

Static Public Member Functions

static FORCEINLINE int32 InterlockedIncrement (volatile int32 *Value)
 
static FORCEINLINE int64 InterlockedIncrement (volatile int64 *Value)
 
static FORCEINLINE int32 InterlockedDecrement (volatile int32 *Value)
 
static FORCEINLINE int64 InterlockedDecrement (volatile int64 *Value)
 
static FORCEINLINE int32 InterlockedAdd (volatile int32 *Value, int32 Amount)
 
static FORCEINLINE int64 InterlockedAdd (volatile int64 *Value, int64 Amount)
 
static FORCEINLINE int32 InterlockedExchange (volatile int32 *Value, int32 Exchange)
 
static FORCEINLINE int64 InterlockedExchange (volatile int64 *Value, int64 Exchange)
 
static FORCEINLINE void * InterlockedExchangePtr (void **Dest, void *Exchange)
 
static FORCEINLINE int32 InterlockedCompareExchange (volatile int32 *Dest, int32 Exchange, int32 Comparand)
 
static FORCEINLINE int64 InterlockedCompareExchange (volatile int64 *Dest, int64 Exchange, int64 Comparand)
 
static FORCEINLINE int64 AtomicRead64 (volatile const int64 *Src)
 
static FORCEINLINE void * InterlockedCompareExchangePointer (void **Dest, void *Exchange, void *Comparand)
 
- Static Public Member Functions inherited from FGenericPlatformAtomics
static FORCEINLINE bool CanUseCompareExchange128 ()
 

Static Protected Member Functions

static 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

Definition at line 12 of file WindowsPlatformAtomics.h.

Member Function Documentation

◆ AtomicRead64()

static FORCEINLINE int64 FWindowsPlatformAtomics::AtomicRead64 ( volatile const int64 * Src)
inlinestatic

Definition at line 128 of file WindowsPlatformAtomics.h.

◆ HandleAtomicsFailure()

static 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/2]

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

Definition at line 63 of file WindowsPlatformAtomics.h.

◆ InterlockedAdd() [2/2]

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

Definition at line 69 of file WindowsPlatformAtomics.h.

◆ InterlockedCompareExchange() [1/2]

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

Definition at line 118 of file WindowsPlatformAtomics.h.

◆ InterlockedCompareExchange() [2/2]

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

Definition at line 124 of file WindowsPlatformAtomics.h.

◆ InterlockedCompareExchangePointer()

static FORCEINLINE void * FWindowsPlatformAtomics::InterlockedCompareExchangePointer ( void ** 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.

Definition at line 175 of file WindowsPlatformAtomics.h.

◆ InterlockedDecrement() [1/2]

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

Definition at line 39 of file WindowsPlatformAtomics.h.

◆ InterlockedDecrement() [2/2]

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

Definition at line 45 of file WindowsPlatformAtomics.h.

◆ InterlockedExchange() [1/2]

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

Definition at line 87 of file WindowsPlatformAtomics.h.

◆ InterlockedExchange() [2/2]

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

Definition at line 92 of file WindowsPlatformAtomics.h.

◆ InterlockedExchangePtr()

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

Definition at line 109 of file WindowsPlatformAtomics.h.

◆ InterlockedIncrement() [1/2]

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

Definition at line 15 of file WindowsPlatformAtomics.h.

◆ InterlockedIncrement() [2/2]

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

Definition at line 21 of file WindowsPlatformAtomics.h.


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