• Synchronizes the cache of all CPUs with the DMA buffer, by flushing the data from the CPU caches.
![]() | |
| This function should be called before performing a DMA transfer (see Remarks below). |
DWORD WD_DMASyncCpu(
HANDLE hWD,
WD_DMA *pDMA);
| Name | Type | Input/Output |
|---|---|---|
| hWD | HANDLE | Input |
| pDMA | WD_DMA* | Input |
| Name | Description |
|---|---|
| hWD | Handle to WinDriver's kernel-mode driver as
received from WD_Open() [5.2] |
| pDMA |
Pointer to a DMA information structure, received from a previous call to
WD_DMALock() [2.13]
|
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate
error code otherwise [A].
WD_DMASyncCpu(), just before a read transfer, the data
transferred into system memory by the DMA operation could be overwritten
with stale data if the CPU cache is flushed later. Unless the CPU cache has
been flushed by calling WD_DMASyncCpu() just before a write
transfer, the data in the CPU cache might be more up-to-date than the copy
in memory.
WD_DMASyncCpu(hWD, &dma);