void co_memory_readblock(co_memory mem, unsigned int offset, void *buf, size_t buffersize);
This function reads a block of data from a shared memory. This function must be called from within a process run function.
The arguments for co_memory_readblock are as follows:
co_memory_readblock performs a block DMA transfer between shared memories and local memories. The third argument, buf, is an array that represents a block of local RAM. Note that co_memory_readblock is not designed for efficient random access of individual memory locations. Note also that stream interfaces may actually provide better performance than memory block reads and writes if the system contains a CPU.
The co_errno variable is set to CO_EMEM_OUT_OF_BOUNDS if the offset is outside the bounds of the memory. co_errno is set to CO_ENULL_PTR if the argument mem is NULL.