Function
The osi_copy64 service moves a
block of data in either direction between 64-bit addressed user and
PFS buffers.
Requirements
Operation |
Environment |
---|
Authorization: |
Supervisor state; any PSW key |
Dispatchable unit mode: |
Task or SRB |
Cross memory mode: |
Any |
AMODE: |
31- or 64-bit |
ASC mode: |
Any |
Interrupt status: |
Enabled for interrupts |
Locks: |
Unlocked |
Control parameters: |
All parameters must be 31-bit addressable by the caller and
in the primary address space. |
Format
osi_copy64(copy64_struct,
Workarea);
Parameters
- copy64_struct
- Supplied and returned parameter
- Type:
- Structure
- Length:
- Specified by the 64_length field
The parameters of this service are contained in
the copy64_struct. See Usage notes for a description
of the fields in this structure.
- Workarea
- Supplied parameter
- Type:
- Character
- Length:
- 512 bytes
Workarea is a 512-byte buffer
that resides below the 2GB line and is aligned on a doubleword boundary.
It can be used by the service for dynamic storage.
Usage notes
- The osi_copy64 service can be called in AMODE 31 or AMODE 64,
and the buffers may be above or below the 2GB line. In all cases the
full 64-bit addresses must be valid. In releases prior to z/OS® V1R5, the osi_copy64 service
may be called only in AMODE 31.
- The size of the R1 address and of the parameter list addresses
that it points to are assumed to correspond to the AMODE of the caller
at the time of the call.
- copy64_struct contains the following fields:
- c64_sourcebuff
- The source address for the copy. The source is always copied to
the destination (c64_destbuff).
- c64_destbuff
- The destination address for the copy.
- c64_direction
- Specifies whether MVCSK (In) or MVCDK (Out) should be used.
- c64_keybits
- Contains the 4-bit key of the user's data.
- c64_copylen
- Specifies the length of the data to be copied. This is a 32-bit
field.
- c64_dontincrsrc
- The source address will be incremented by the c64_copylen to
facilitate looping calls, unless this flag is set.
- 64_dontincrdest
- The destination address will be incremented by the c64_copylen
to facilitate looping calls, unless this flag is set.
- c64_gotrecovery
- If the PFS has its own EFAULT recovery, you can avoid the overhead
involved in the setting up and taking down of an FRR on each call
to this service by setting this flag.
- c64_rc
- Indicates the success or failure of the operation, as described
in this topic.
- c64_rsn
- Indicates the success or failure of the operation, as described
in this topic.
- c64_sourcealet
- Contains the ALET of the source buffer.
- c64_destalet
- Contains the ALET of the destination buffer.
- c64_length
- Contains the length of the copy64_struct itself.
- The results of the operation are returned in c64_rc as either:
- 0
- The operation was successful, and c64_copylen bytes were moved.
- Nonzero
- The operation failed. This is the failing return code, and c64_rsn
contains the failing reason code. The osi_copy64 service may return
the following return code:
Return_code |
Explanation |
---|
EFAULT |
A specified buffer address is not in addressable storage. |
- The osi_copy64 routine is a high-performance routine. It does
not issue program calls (PC) into the kernel.
- If the PFS has no storage below the 2GB line for the Workarea,
the OSI WorkArea can be used.
Characteristics and restrictions
Whenever
it is used to copy user address space areas, this routine must be
used only on the dispatchable unit (task or SRB) that made the original
vnode or VFS call because the service requires the use of the cross-memory
environment of the calling dispatchable unit.