RtGetThreadCLOS
RtGetThreadCLOS retrieves the Class of Services (CLOS) value of a specified thread.
NOTE: RtGetThreadCLOS is only supported in the RTSS environment. It cannot be called from a Windows application linked to RTX64.
Syntax
BOOL RtGetThreadCLOS( HANDLE hThread, ULONG *pCLOS );
Parameters
hThread
The RTSS thread handle whose CLOS value will be returned.
pCLOS
A pointer to a ULONG variable. It stores the thread’s explicit CLOS (if set by the user) or the implicit/default CLOS value.
Return Value
Returns TRUE if the function succeeds; returns FALSE if the argument was invalid or if RDT is not supported or is disabled in the RTX64 Control Panel.
Remarks
A thread has implicit/default CLOS which is based on its priority when the Subsystem is configured to use Priority-based CLOS performance mode. The implicit/default CLOS and priority are inversely mapped with the RTSS priority range (0~127) by the number of CLOS available to RTSS processors/cores. Use real-time function RtGetRDTCapability to determine the number of CLOS. With Flat performance mode the default CLOS is 0.
For example, the mapping table below is for the number of CLOS equal to 7.
CLOS | RTSS Priority Range |
---|---|
0 | 109~127 |
1 | 90~108 |
2 | 72~89 |
3 | 54~71 |
4 | 36~53 |
5 | 18~35 |
6 | 0~17 |
The implicit/default CLOS of RTSS thread can be overwritten by RtSetThreadCLOS. When the thread is scheduled to run, its CLOS is used to guide the hardware’s LLC fill policy and memory throttling.
Requirements
Minimum Supported Version | RTX64 3.5 |
Header | RtssApi.h |
Library | Rtx_Rtss.lib |
See Also:
Optimizing Performance with Intel Resource Director Technology (RDT)