|
|
The function RtcplSetStarvationTimeout sets the Starvation timeout interval.
Syntax
BOOL RtcplSetStarvationTimeout( DWORD Behavior, DWORD Timeout );
Parameters
Behavior
One of the following defines:
|
Value |
Description |
|
STARVATION_YIELD |
RTX performs a context switch from RTSS to Windows for the remaining time of the current tick. |
|
STARVATION_FREEZE |
RTX stops or freezes all RTSS applications, depending on the process exception disposition setting, which you can obtain with RtcplGetFreezeFaultingProcessOnException. |
|
STARVATION_DISABLE |
The starvation timer is disabled and so RTX does not monitor for Windows starvation. |
Timeout
Specifies the number of microseconds of the starvation time out period. This parameter is ignored if Behavior is set to STARVATION_DISABLE. The minimum value can not be less then the Hal Timer Period, unless disabling the timeout by setting the value to 0. The minimum (and default) value is 0 and the maximum is 10,000,000.
Return Values
A non-zero value if the function succeeds
Remarks
Changing this behavior requires a restart of the RTX Subsystem if it is running, as indicated by a GetLastError of ERROR_SUCCESS_RESTART_REQUIRED.
You can make the RTX Scheduler monitor for highly CPU-intensive RTSS applications and notify the RTX subsystem if Windows has not been allowed to run for a period of time that you specify. The timeout value for Windows starvation depends on RTX load, Windows application load, and whether or not your application uses multimedia timers.
You can configure how RTX treats these Windows starvation notifications:
Related RTX Properties Control Panel Features
|
Tab |
|
|
Feature(s) |
Starvation options |
Requirements
| Header | RtxProp.h |
| Library | RtxProp.lib |