RtGetProcessAffinityMask

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

Syntax

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

Parameters

hProcess

A handle to the process whose affinity mask is desired.

pProcessAffinityMask

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

pSystemAffinityMask

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

Return Value

If the function succeeds, it returns a non-zero value. The function sets the variables pointed to by lpProcessAffinityMask and lpSystemAffinityMask to the appropriate affinity masks.

If the function fails, it returns 0 (zero). 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 Process.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

Rtapi.h rtkrnl.lib

See Also: