RtSetFlushTLBTickMod

The function RtSetFlushTLBTickMod allows a RTSS process to set the frequency that the Cache Translation Lookaside Buffer (TLB) is flushed for the RTSS cores. This flushing of the TLB can be set to a modulo of the Subsystem's HAL timer period.

NOTE: RtSetFLushTLBTickMod is only supported in the RTSS environment. It cannot be called from a Windows application linked to RTX64.

Syntax

BOOL RtSetFlushTLBTickMod(
	ULONG TickMod
);

Parameters

TickMod

This value specifies the frequency (in unit of HAL timer periods) at which the RTSS cores' TLB are flushed. For example, the value 2 means two HAL timer periods.

Return Value

Returns TRUE if the function succeeds; returns FALSE if the function fails.

Remarks

Flushing a cache’s TLB is handled by the real-time Subsystem whenever a RTSS core is idle. However, in some circumstances developers may write code that does not allow the RTSS idle threads to run. In such cases, developers may need to periodically cause the cache’s TLB to be flushed so they do not run into cache coherency issues. To allow for this, RTSS provides RtSetFlushTLBTickMod, which allows a developer to set the real-time Subsystem to periodically flush the RTSS core’s cache TLB.

Since the real-time Subsystem handles most instances when the cache’s TLB needs to be flushed, the default value for the periodic flushing of the TLB is set to 0, meaning it is disabled.

For performance purposes, the value of TickMod should be a power of 2. Otherwise, the set value will be rounded up or down to a value of the nearest power of 2.

Whenever the remainder of the HAL tick count divided by the flush TLB tick mod is zero, each RTSS processor/core flushes its TLB.

Requirements

Minimum Supported Version RTX64 3.0
Header RtssApi.h
Library Rtx_Rtss.lib

See Also:

RtGetFlushTLBTickMod