RtSetProcessAffinityMask

RtSetProcessAffinityMask sets a processor affinity mask for the threads of the specified RTSS process.

Syntax

BOOL RtSetProcessAffinityMask(
    HANDLE hProcess,
    UINT64 ProcessAffinityMask
);

Parameters

hProcess

A handle to the RTSS process whose affinity mask is to be set.

ProcessAffinityMask

The affinity mask for the threads of the RTSS process.

Return Value

A non-zero value if the function succeeds, 0 (zero) if the function fails

To get extended error information, call GetLastError.

Remarks

A process affinity mask is a bit vector in which each bit represents the processor on which the threads of the RTSS process are allowed to run. See Specifying a Processor Affinity Bitmask for more details.

The value of the process affinity mask must be a subset of the RTSS system affinity mask values obtained by the RtGetProcessAffinityMask function.

To set the processor affinity mask for an RTSS process from a Win32 process, you can call this API in Win32 applications.

Requirements

Minimum Supported Version

RTX64 2013

API changes for RTX64 4.0

  • Changed DWORD_PTR ProcessAffinityMask to UINT64 ProcessAffinityMask
Header Rtapi.h
Library RtApi.lib (Windows), Rtx_Rtss.lib (RTSS)

See Also:

RtGetProcessAffinityMask