RtGetProcessAffinityMask

RtGetProcessAffinityMask retrieves the process affinity mask for the specified RTSS process and the system affinity mask for RTSS.

Syntax

BOOL RtGetProcessAffinityMask(
    HANDLE hProcess,
    PUINT64 pProcessAffinityMask,
    PUINT64 pSystemAffinityMask
);

Parameters

hProcess

A handle to the RTSS process whose affinity mask is desired.

pProcessAffinityMask

A pointer to a variable that receives the affinity mask for the specified RTSS process.

pSystemAffinityMask

A pointer to a variable that receives the system affinity mask for RTSS.

Return Value

A non-zero value if the function succeeds. The function sets the variables pointed to by lpProcessAffinityMask and lpSystemAffinityMask to the appropriate affinity masks.

Zero if the function fails.The values of the variables pointed to by lpProcessAffinityMask and lpSystemAffinityMask are undefined.

To get extended error information, call GetLastError.

Remarks

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

To retrieve an RTSS process affinity mask and RTSS system affinity mask 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 PDWORD_PTR pProcessAffinityMask to PUINT64 pProcessAffinityMask   
  • Changed PDWORD_PTR pSystemAffinityMask to PUINT64 pSystemAffinityMask
Header Rtapi.h
Library RtApi.lib (Windows), Rtx_Rtss.lib (RTSS)

See Also:

RtSetProcessAffinityMask