PFMultiplayerSetThreadAffinityMask

Optionally configures the processor on which internal Multiplayer library threads will run.

Syntax

HRESULT PFMultiplayerSetThreadAffinityMask(  
    PFMultiplayerThreadId threadId,  
    uint64_t threadAffinityMask  
)  

Parameters

threadId   PFMultiplayerThreadId

The type of internal Multiplayer library thread to configure processor affinity.

threadAffinityMask   uint64_t

The affinity mask for this type of Multiplayer library thread.

Return value

Type: HRESULT

S_OK if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via PFMultiplayerGetErrorMessage().

Remarks

This method enables the title to configure the processor affinity for internal Multiplayer library threads of a given type.

This method may be called at any time before or after PFMultiplayerInitialize() and will take effect immediately. Thread processor settings are persisted across calls to PFMultiplayerUninitialize() and PFMultiplayerInitialize(). When there are more than 64 cores present, this method always applies to processor group 0.

In order to specify any processor, pass PFMultiplayerAnyProcessor as the threadAffinityMask parameter. This is also the default value the Multiplayer library will use if this method is never called.

Requirements

Header: PFMultiplayer.h

See also

PFMultiplayer members
PFMultiplayerThreadId