RtfwSetProcessorConfiguration
RtfwSetProcessorConfiguration configures the processor configuration of the RTX64 Subsystem.
Syntax
bool RtfwSetProcessorConfiguration( DWORD requestedWindowsProcessorCount, DWORD requestedRTSSProcessorCount, DWORD* pWarning );
Parameters
requestedWindowsProcessorCount
Specifies the number of Windows processors, which must be at least one and not exceed one less than the total number of processors in the system.
requestedRTSSProcessorCount
Specifies the requested number of RTSS processors, which must be at least one and not exceed one less than the total number of processors in the system.
pWarning
A pointer to a value that is set to a non-zero warning code if a warning results from a successful call to this API. If this API fails, this value is undefined. See preprocessor macros RT_WARNING_... in header file RtErrorCodes.h for possible warning codes.
Return Value
The function returns true if it succeeds. Otherwise, it returns false. Call GetLastError for additional error information.
Possible error codes:
Error Code | Meaning |
---|---|
ERROR_ACCESS_DENIED | The caller did not have Administrator privileges. |
ERROR_INVALID_PARAMETER | The sum of requestedWindowsProcesssorCount and requestedRTSSProcessorCount exceeds the total number of processors in the system. This is not supported. |
RT_ERROR_RESTART_SUBSYSTEM |
(Success) Occurs when errors RT_ERROR_INCONSISTENT_PROCESSOR_CONFIGURATION and RT_ERROR_RESTART_WINDOWS were not set, the number of Windows processors has not changed, the number of RTSS processors has changed, and the Subsystem is running. RtfwRestartRequired will report that the RTX64 Subsystem must be restarted. NOTE: The RTX64 Subsystem must be restarted for the changes to take effect. |
RT_ERROR_RESTART_WINDOWS | (Success) Occurs when error RT_ERROR_INCONSISTENT_PROCESSOR_CONFIGURATION was not set, and the number of Windows processors has changed. RtfwRestartRequired will report that Windows must be restarted. |
RT_ERROR_SUBSYSTEM_START_STOP_IN_PROGRESS | The RTX64 Subsystem was in the process of starting or stopping when this API was called |
RT_WARNING_INCONSISTENT_PROCESSOR_CONFIGURATION | The new processor configuration has no RTSS processor corresponding to any processor numbers configured elsewhere (e.g., the ideal processor of the RT_TCP/IP stack or the processor numbers configured for a network interface). As a result, all processor numbers are set to a value of 0, which means the first RTSS processor. |
Requirements
Minimum Required Version | RTX64 3.4 |
Header | RtfwAPI.h |
Library | RtfwAPI.lib |
See Also: