RtSetProcessAffinityMask

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

Syntax

Copy
BOOL RtSetProcessAffinityMask(
    [in]    HANDLE hProcess,
    [in]    UINT64 ProcessAffinityMask
);

Parameters

[in] hProcess

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

[in] ProcessAffinityMask

The affinity mask for the threads of the RTSS process.

Return Value

If the function succeeds, it returns a non-zero value. If the function fails, it returns zero. Call GetLastError to obtain an error code.

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 Windows process, you can call this API in Windows applications.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtApi.h

RtApi.lib (Windows), Startup.lib (RTSS)

See Also: