Compartilhar via


OEMFlushCache (Windows CE 5.0)

Send Feedback

This function is called by the kernel in response to a CacheSync function request.

_OEMFlushCache PROC NEAR PUBLIC

Parameters

None.

Return Values

None.

Remarks

OEMFlushCache writes back and invalidates, or flushes, the cache. However, on x86 platforms the cache is fairly sophisticated and coherent even when you write to uncached addresses; therefore, a cache flush is not needed. The write-back portion of a flush causes the cache lines to be written to memory and completed before the function returns.

On x86, the file system is in write-through mode, so you only need to be sure that the write buffers on the write-through cache are drained. If you do not, the write-through cache is free to slowly drain the write buffers and you cannot guarantee the transacted file system.

Note   Only x86 can optimize in this manner.

Example Code

_OEMFlushCache PROC NEAR PUBLIC
;Read an UNCACHED address to serialize. No actual cache flush required.
;
        mov     eax, DWORD PTR ds:0A0000000h    xor    eax, eax   ret
_OEMFlushCache  ENDP

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Not applicable.
Link Library: Nk.lib.

See Also

CacheSync | Cache Flush Routines | Resume State | Suspend State

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.