gtpc2m8d | C/C++ Language Support User's Guide |
This function moves data between an ECB virtual memory (EVM) address space
and a system virtual memory (SVM) address space. tpf_movec
permits an ECB-controlled program to read and modify storage that is not part
of its own address space.
Format
#include <sysapi.h>
void tpf_movec(const void *fromaddr, int fromvm, void *toaddr,
int tovm, long length);
- fromaddr
- Specifies the location from which data will be moved.
- fromvm
- Specifies whether the location from which data is being moved is an EVM
address space or an SVM address space. The following symbols are
defined in the sysapi.h header file for use in the
fromaddr member:
- TPF_MOVEC_EVA - Identifies the address as an EVA address.
- TPF_MOVEC_SVA - Identifies the address as an SVA address.
- toaddr
- Specifies the location to which data will be moved.
- tovm
- Specifies whether the location to which data is being moved is an EVM
address space or an SVM address space. The following symbols are
defined in the sysapi.h header file for use in the
fromaddr member:
- TPF_MOVEC_EVA - Identifies the address as an EVA address.
- TPF_MOVEC_SVA - Identifies the address as an SVA address.
- length
- Specifies the length of the data to be moved.
Normal Return
Void.
Error Return
Not applicable.
Programming Considerations
- This function requires that the application program allocation specify key
0 write authorization and authorization to issue a restricted macro.
- This function may be executed on any I-stream.
- You can move data between address spaces as follows:
- From EVM to SVM
- From SVM to EVM
- From EVM to EVM
- From SVM to SVM.
- Note:
- The EVM-to-EVM combination is restricted to movement in a single ECB virtual
memory, not between two EVMs. To move data from one EVM to another EVM,
use the tpf_movec_EVM function.
- System error dumps can occur when servicing a tpf_movec
request. See TPF Messages, Volume 1 and TPF Messages, Volume 2 for more information.
Examples
The following example shows an ECB field being moved from an SVM address
space to an EVM address space:
#include <sysapi.h>
·
·
·
struct eb0eb * sva = usoEntry.sva_address;
u_long ecbActive = 0;
tpf_movec(&sva->ce1aii, TPF_MOVEC_SVA,
&ecbActive, TPF_MOVEC_EVA,
sizeof(ecbActive));
Related Information
tpf_movec_EVM-Move Data from One EVM to Another EVM.