Share via


OEMFlushCache (Windows Embedded CE 6.0)

1/5/2010

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

Syntax

_OEMFlushCache PROC NEAR PUBLIC

Parameters

None.

Return Value

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

Header Developer Implemented
Library OEMMain.lib or OEMMain_StaticKITL.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Tasks

Suspend State

Reference

Required OAL Functions

Concepts

Cache Flush Routines
Resume State

Other Resources

CacheSync