a0NewDMARegion()

Creates a new DMA region descriptor.


Syntax

a0tError a0NewDMARegion(
a0tDMARegion *region,
a0tFormat *format,
void *address,
int count );

Arguments

Namerd/wrDescription
region write Address of the DMA region descriptor to build.
format read Format of the memory region to use.
address read Address of the memory region to use.
count read Number of elements.

Description

This function creates a data descriptor region that starts at the local memory address address. The local memory is assumed to have the format format and count elements. All remote read and write accesses are done in a DMA region1 . Thus, to make remote accesses possible to the local memory, a DMA region descriptor must be created and sent to the remote threads that need access to it.

On return of this function, the variable pointed by region contains a DMA region descriptor that uses the given formatted memory.


Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0ErrOkSuccessful completion.

See Also

a0FRead() a0FWrite() a0IFRead() a0IFWrite() a0UseFormats() a0NewMapFormat() a0NewFunctionFormat()


1 DMA stands for Direct Memory Access.