UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FRunnableThreadUnix Class Reference

#include <UnixPlatformRunnableThread.h>

+ Inheritance diagram for FRunnableThreadUnix:

Public Member Functions

 FRunnableThreadUnix ()
 
 ~FRunnableThreadUnix ()
 

Static Public Member Functions

static voidAllocCrashHandlerStack ()
 
static void FreeCrashHandlerStack (void *StackBuffer)
 
static uint64 GetCrashHandlerStackSize ()
 
static bool SetupSignalHandlerStack (void *StackBuffer, const size_t StackBufferSize, void **OutStackGuardPageAddress)
 

Static Public Attributes

static voidMainThreadSignalHandlerStack = nullptr
 

Protected Member Functions

int32 TranslateThreadPriority (EThreadPriority Priority) override
 
void SetThreadPriority (EThreadPriority NewPriority) override
 
void SetThreadPriority (pthread_t InThread, EThreadPriority NewPriority) override
 

Detailed Description

Unix implementation of the Process OS functions

Constructor & Destructor Documentation

◆ FRunnableThreadUnix()

FRunnableThreadUnix::FRunnableThreadUnix ( )
inline

◆ ~FRunnableThreadUnix()

FRunnableThreadUnix::~FRunnableThreadUnix ( )
inline

Member Function Documentation

◆ AllocCrashHandlerStack()

void * FRunnableThreadUnix::AllocCrashHandlerStack ( )
static

◆ FreeCrashHandlerStack()

void FRunnableThreadUnix::FreeCrashHandlerStack ( void StackBuffer)
static

◆ GetCrashHandlerStackSize()

uint64 FRunnableThreadUnix::GetCrashHandlerStackSize ( )
static

◆ SetThreadPriority() [1/2]

void FRunnableThreadUnix::SetThreadPriority ( EThreadPriority  NewPriority)
overrideprotected

◆ SetThreadPriority() [2/2]

void FRunnableThreadUnix::SetThreadPriority ( pthread_t  InThread,
EThreadPriority  NewPriority 
)
overrideprotected

◆ SetupSignalHandlerStack()

bool FRunnableThreadUnix::SetupSignalHandlerStack ( void StackBuffer,
const size_t  StackBufferSize,
void **  OutStackGuardPageAddress 
)
static

Sets up an alt stack for signal (including crash) handling on this thread.

This includes guard page at the end of the stack to make running out of stack more obvious. Should be run in the context of the thread.

Parameters
StackBufferpointer to the beginning of the stack buffer (note: on x86_64 will be the bottom of the stack, not its beginning)
StackSizesize of the stack buffer
OutStackGuardPageAddresspointer to the variable that will receive the address of the guard page. Can be null. Will not be set if guard page wasn't successfully set.
Returns
true if setting the alt stack succeeded. Inability to set guard page will not affect success of the operation.

◆ TranslateThreadPriority()

int32 FRunnableThreadUnix::TranslateThreadPriority ( EThreadPriority  Priority)
overrideprotected

on Unix, this translates to ranges of setpriority(). Note that not all range may be available

Member Data Documentation

◆ MainThreadSignalHandlerStack

void * FRunnableThreadUnix::MainThreadSignalHandlerStack = nullptr
static

Separate stack for the signal handler (so possible stack overflows don't go unnoticed), for the main thread specifically.


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