---
title: complete
framework: kernel
role: symbol
role_heading: Instance Method
path: kernel/iodmacommand/1547730-complete
---

# complete

Complete processing of DMA mappings after an I/O transfer is finished.

## Declaration

```occ
virtual IOReturn complete(bool invalidateCache, bool synchronize);
```

## Parameters

- `invalidCache`: Invalidate the caches for the memory descriptor. Defaults to true for kNonCoherent and is ignored by the other types.
- `synchronize`: Copy any buffered data back to the target IOMemoryDescriptor. Defaults to true, if synchronize() is being used to explicitly copy data, passing false may avoid an unneeded copy.

## Return Value

Return Value kIOReturnNotReady if not prepared, kIOReturnSuccess otherwise.

## Discussion

Discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer

## See Also

### Preparing the Transfer Operation

- [prepare](kernel/iodmacommand/1811284-prepare.md)
- [prepare](kernel/iodmacommand/1547728-prepare.md)
- [prepareWithSpecification](kernel/iodmacommand/1811291-preparewithspecification.md)
- [prepareWithSpecification](kernel/iodmacommand/1547733-preparewithspecification.md)
- [prepareWithSpecification](kernel/iodmacommand/3516451-preparewithspecification.md)
- [complete](kernel/iodmacommand/1811081-complete.md)
- [synchronize](kernel/iodmacommand/1811316-synchronize.md)
- [synchronize](kernel/iodmacommand/1547719-synchronize.md)
