Compartir a través de


CacheRangeFlush (Windows CE 5.0)

Send Feedback

This function is called by device drivers and applications to flush a specific range of the cache.

void CacheRangeFlush(LPVOIDpAddr,DWORDdwLength,DWORDdwFlags );

Parameters

  • pAddr
    [in] Starting virtual address where the cache operation is to be performed in. The cache operation is specified by the value in dwFlags.
  • dwLength
    [in] Specifies the length, in bytes.
  • dwFlags
    [in] Specifies the operation to be performed. The following table shows the values you can specify for the dwFlags parameter.
    Value Description
    CACHE_SYNC_WRITEBACK Write back cached data.
    CACHE_SYNC_DISCARD Write back and discard cached data.
    CACHE_SYNC_INSTRUCTIONS Discard all cached instructions.
    CACHE_SYNC_FLUSH_I_TLB Flush the instruction translation look-aside buffer (TLB).
    CACHE_SYNC_FLUSH_D_TLB Flush the data TLB.
    CACHE_SYNC_FLUSH_TLB Flush both the instruction and data TLBs.
    CACHE_SYNC_L2_WRITEBACK Write back the L2 cache.
    CACHE_SYNC_L2_DISCARD Write back and discard the L2 cache.
    CACHE_SYNC_ALL Perform all of the above operations.

Return Values

None.

Remarks

pAddr=0 and dwLength=0 is a special case, which means all addresses. For example, the call CacheRangeFlush(0, 0, CACHE_SYNC_FLUSH_TLB) will flush the data in the TLB. CacheRangeFlush(0, 0, CACHE_SYNC_DISCARD) will write back and discard everything in the data cache.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Pkfuncs.h.
Link Library: Coredll.lib.

See Also

OEMCacheRangeFlush

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.