RtSetFlushTLBTickMod
The function RtSetFlushTLBTickMod allows an RTSS process to set the frequency at which the Cache Translation Lookaside Buffer (TLB) is flushed for RTSS cores. This flushing rate of the TLB is set to a modulo of the Subsystem's HAL tick count.
Note: RtSetFLushTLBTickMod is only supported in the RTSS environment. It cannot be called from a Windows application linked to wRTOS.
Syntax
BOOL RtSetFlushTLBTickMod(
[in] ULONG TickMod
);
Parameters
[in] TickMod
The frequency at which the RTSS cores’ TLB will be flushed. This value should be a mod of the HAL tick count. For example, if your HAL Timer period is set to 100 microseconds and you want to flush the cache‘s TLB every 200 microseconds, you would specify a frequency of 2.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE.
Remarks
Flushing a cache’s TLB is handled by the real-time Subsystem whenever an 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 based on a mod of the HAL tick count.
Since the real-time Subsystem handles most instances when the cache’s TLB needs to be flushed, the default TLB periodic flushing value is set to 0 (disabled).
For performance purposes, the TickMod value should be a power of 2. Otherwise, the set value will be truncated to a value of the nearest power of 2.
Each RTSS processor/core flushes its TLB whenever the remainder of the HAL tick count divided by the flush TLB tick mod is zero
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtssApi.h |
Startup.lib |
See Also: