UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LockFreeList.h File Reference
#include "Containers/Array.h"
#include "Containers/ContainersFwd.h"
#include "CoreGlobals.h"
#include "CoreTypes.h"
#include "HAL/PlatformAtomics.h"
#include "HAL/PlatformProcess.h"
#include "HAL/ThreadSafeCounter.h"
#include "Logging/LogMacros.h"
#include "Misc/AssertionMacros.h"
#include "Misc/NoopCounter.h"
#include "Templates/AlignmentTemplates.h"
#include "Templates/Function.h"
#include <atomic>

Go to the source code of this file.

Classes

class  TLockFreeAllocOnceIndexedAllocator< T, MaxTotalItems, ItemsPerPage >
 
struct  FIndexedPointer
 
struct  FIndexedLockFreeLink
 
struct  FLockFreeLinkPolicy
 
class  FLockFreePointerListLIFORoot< TPaddingForCacheContention, TABAInc >
 
class  FLockFreePointerListLIFOBase< T, TPaddingForCacheContention, TABAInc >
 
class  FLockFreePointerFIFOBase< T, TPaddingForCacheContention, TABAInc >
 
class  FStallingTaskQueue< T, TPaddingForCacheContention, NumPriorities >
 
class  TLockFreePointerListLIFOPad< T, TPaddingForCacheContention >
 
class  TLockFreePointerListLIFO< T >
 
class  TLockFreePointerListUnordered< T, TPaddingForCacheContention >
 
class  TLockFreePointerListFIFO< T, TPaddingForCacheContention >
 
class  TClosableLockFreePointerListUnorderedSingleConsumer< T, TPaddingForCacheContention >
 

Macros

#define checkLockFreePointerList   checkSlow
 
#define MAX_LOCK_FREE_LINKS_AS_BITS   (26)
 
#define MAX_LOCK_FREE_LINKS   (1 << 26)
 
#define MAX_TagBitsValue   (uint64(1) << (64 - MAX_LOCK_FREE_LINKS_AS_BITS))
 

Functions

CORE_API DECLARE_LOG_CATEGORY_EXTERN (LogLockFreeList, Log, All)
 
CORE_API void DoTestCriticalStall ()
 
void TestCriticalStall ()
 
CORE_API void LockFreeTagCounterHasOverflowed ()
 
CORE_API void LockFreeLinksExhausted (uint32 TotalNum)
 
CORE_API voidLockFreeAllocLinks (SIZE_T AllocSize)
 
CORE_API void LockFreeFreeLinks (SIZE_T AllocSize, void *Ptr)
 
struct FIndexedPointer GCC_ALIGN (8)
 
void Init ()
 
void SetAll (uint32 Ptr, uint64 CounterAndState)
 
UE_FORCEINLINE_HINT uint32 GetPtr () const
 
UE_FORCEINLINE_HINT void SetPtr (uint32 To)
 
UE_FORCEINLINE_HINT uint64 GetCounterAndState () const
 
UE_FORCEINLINE_HINT void SetCounterAndState (uint64 To)
 
void AdvanceCounterAndState (const FIndexedPointer &From, uint64 TABAInc)
 
template<uint64 TABAInc>
UE_FORCEINLINE_HINT uint64 GetState () const
 
template<uint64 TABAInc>
void SetState (uint64 Value)
 
void AtomicRead (const FIndexedPointer &Other)
 
bool InterlockedCompareExchange (const FIndexedPointer &Exchange, const FIndexedPointer &Comparand)
 
UE_FORCEINLINE_HINT bool operator== (const FIndexedPointer &Other) const
 
UE_FORCEINLINE_HINT bool operator!= (const FIndexedPointer &Other) const
 

Variables

CORE_API int32 GTestCriticalStalls
 
struct FIndexedLockFreeLink GCC_ALIGN
 

Macro Definition Documentation

◆ checkLockFreePointerList

#define checkLockFreePointerList   checkSlow

◆ MAX_LOCK_FREE_LINKS

#define MAX_LOCK_FREE_LINKS   (1 << 26)

◆ MAX_LOCK_FREE_LINKS_AS_BITS

#define MAX_LOCK_FREE_LINKS_AS_BITS   (26)

◆ MAX_TagBitsValue

#define MAX_TagBitsValue   (uint64(1) << (64 - MAX_LOCK_FREE_LINKS_AS_BITS))

Function Documentation

◆ AdvanceCounterAndState()

void GCC_ALIGN::AdvanceCounterAndState ( const FIndexedPointer From,
uint64  TABAInc 
)
inline

◆ AtomicRead()

void GCC_ALIGN::AtomicRead ( const FIndexedPointer Other)
inline

◆ DECLARE_LOG_CATEGORY_EXTERN()

CORE_API DECLARE_LOG_CATEGORY_EXTERN ( LogLockFreeList  ,
Log  ,
All   
)

◆ DoTestCriticalStall()

CORE_API void DoTestCriticalStall ( )

◆ GCC_ALIGN()

struct FIndexedPointer GCC_ALIGN ( )

◆ GetCounterAndState()

UE_FORCEINLINE_HINT uint64 GCC_ALIGN::GetCounterAndState ( ) const

◆ GetPtr()

UE_FORCEINLINE_HINT uint32 GCC_ALIGN::GetPtr ( ) const

◆ GetState()

template<uint64 TABAInc>
UE_FORCEINLINE_HINT uint64 GCC_ALIGN::GetState ( ) const

◆ Init()

void GCC_ALIGN::Init ( )

◆ InterlockedCompareExchange()

bool GCC_ALIGN::InterlockedCompareExchange ( const FIndexedPointer Exchange,
const FIndexedPointer Comparand 
)
inline

◆ LockFreeAllocLinks()

CORE_API void * LockFreeAllocLinks ( SIZE_T  AllocSize)

◆ LockFreeFreeLinks()

CORE_API void LockFreeFreeLinks ( SIZE_T  AllocSize,
void Ptr 
)

◆ LockFreeLinksExhausted()

CORE_API void LockFreeLinksExhausted ( uint32  TotalNum)

◆ LockFreeTagCounterHasOverflowed()

CORE_API void LockFreeTagCounterHasOverflowed ( )

◆ operator!=()

◆ operator==()

UE_FORCEINLINE_HINT bool GCC_ALIGN::operator== ( const FIndexedPointer Other) const

◆ SetAll()

void GCC_ALIGN::SetAll ( uint32  Ptr,
uint64  CounterAndState 
)
inline

◆ SetCounterAndState()

UE_FORCEINLINE_HINT void GCC_ALIGN::SetCounterAndState ( uint64  To)

◆ SetPtr()

UE_FORCEINLINE_HINT void GCC_ALIGN::SetPtr ( uint32  To)

◆ SetState()

template<uint64 TABAInc>
void GCC_ALIGN::SetState ( uint64  Value)
inline

◆ TestCriticalStall()

void TestCriticalStall ( )
inline

Variable Documentation

◆ GCC_ALIGN

◆ GTestCriticalStalls

CORE_API int32 GTestCriticalStalls
extern