void co_memory_writeblock(co_memory mem, unsigned int offset, void *buf, size_t buffersize);
This function writes a block of data to a shared memory. This function must be called from within a process run function.
The arguments for co_memory_writeblock are as follows:
The co_memory_writeblock function performs a block DMA transfer between shared memories and local memories. The third argument, buf, is an array that represents a block of shared memory. The type of memory being accessed depends on the targeted platform (see your Platform Support Package documentation). Note that co_memory_writeblock 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.