|
FunctionThe osi_uiomove service moves blocks
of data between PFS buffers and buffers that are defined by a UIO
structure.
RequirementsOperation |
Environment |
---|
Authorization: |
Supervisor state, PSW key 0 |
Dispatchable unit mode: |
Task or SRB |
Cross memory mode: |
Any |
AMODE: |
31-bit |
ASC mode: |
Any |
Interrupt status: |
Enabled for interrupts |
Locks: |
Unlocked |
Control parameters: |
All parameters must be addressable
by the caller and in the primary address space. |
Format osi_uiomove(OSI_structure,
Workarea,
PFS_Buffer,
PFS_Buffer_Alet,
Number_of_bytes,
User_IO_structure,
Return_value,
Return_code,
Reason_code);
Parameters- OSI_structure
- Supplied parameter
- Type:
- Structure
- Length:
- Specified by the Osilen field
OSI_structure contains information that is used
by the OSI operations. The PFS receives this structure on each PFS
interface operation.
Refer to Interface structures for C language servers and clients for
a full description of this structure.
- Workarea
- Supplied parameter
- Type:
- Char
- Length:
- 2048 bytes
Workarea is a buffer of 2048 bytes, aligned on a
word boundary, that is to be used by this OSI operation.
- PFS_Buffer
- Supplied parameter
- Type:
- Char
- Length:
- N/A
The name of the buffer to or from which data is
to be moved.
- PFS_Buffer_Alet
- Supplied parameter
- Type:
- Integer
- Length:
- Fullword
The Alet for the specified PFS_Buffer.
- Number_of_bytes
- Supplied parameter
- Type:
- Integer
- Length:
- Fullword
The number of bytes to move.
- User_IO_structure
- Supplied and returned parameter
- Type:
- UIO
- Length:
- Specified by UIO.u_hdr.cblen.
An area that contains the parameters for the I/O
that is to be performed. This area is mapped by the UIO typedef in
the BPXYVFSI header file (see Interface structures for C language servers and clients). See Specific processing notes for details on how the fields in this
structure are processed.
- Return_value
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
A fullword in which the osi_uiomove service returns
the results of the service, as one of the following: - Return_value
- Meaning
- -1
- The operation was not successful. The Return_code and Reason_code
parameters contain the values that are returned by the service.
- 0 or greater
- The operation was successful. The value represents the number
of bytes that were transferred.
- Return_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
A fullword in which the osi_uiomove service stores
the return code. The osi_uiomove service returns Return_code only
if Return_value is -1. For a complete list of return
codes, see z/OS UNIX System Services Messages and Codes.
- Reason_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
A fullword in which the osi_uiomove service stores
the reason code. The osi_uiomove service returns Return_code only
if Return_value is -1. Reason_code further qualifies
the Return_code value. The reason codes are described in z/OS UNIX System Services Messages and Codes.
Usage notes- The osi_uiomove service moves the number of bytes of data that
is specified by the Number_of_bytes parameter or the UIO.u_count field,
whichever is less. If either of these parameters is zero, no data
is moved, and Return_value field is set to 0.
- The u_iovresidualcnt and u_totalbytesrw fields, described in this
topic, are not set until after the first call to osi_uiomove.
- This service requires the calling program to run in key 0 storage,
because it must update the UIO, and this structure is usually in key
0 storage. Osi_copyin and osi_copyout do not require the calling
program to be in key 0 storage.
- The address of the osi_uiomove routine is passed to the PFS in
the OSIT structure when the PFS is initialized.
- The OSI_structure contains an area, pointed to by osi_workarea,
that may be passed to this service as the Workarea parameter.
- The osi_indirect64 bit in BPXYPFSI indicates that the PFS_Buffer
parameter is a 64-bit address that points to the PFS_ Buffer to be
used by the osi_uiomove service. osi_uiomove turns this bit off before
returning to the caller. Because of this, the caller of osi_uiomove
is responsible for setting the osi_indirect64 flag prior to each invocation
of osi_uiomove that requires a 64-bit address for the PFS_Buffer parameter.
If
the osi_indirect64 flag is set, the PFS_Buffer parameter is assumed
to be an 8-byte address of the actual PFS Buffer. This allows a program
to call the osi_uiomove service in AMODE(31) and still pass the address
of a PFS buffer that is above the bar. The osi_uiomove service turns
this flag off, so it must be reset to ON for every call for which
you want to use indirect buffer addressing. PFS_Buffer_Alet still
refers to the actual buffer itself, not to the 8-byte pointer. The
8byte pointer must be in the primary address space.
Specific processing notesThe
following UIO fields are provided by the LFS: - UIO.u_count
- Specifies the number of bytes in the buffer, or the number of
elements in the IOV array.
- UIO.u_rw
- Specifies whether the request is a read (0) or a write (1). On
a read, the contents of PFS_buffer are moved to Uiouserbuffer. On
a write, the contents of Uiouserbuffer are moved to PFS_buffer.
- UIO.u_iovinuio
- Specifies whether the user_IO_structure points to an iov structure.
- UIO.u_realpage
- Specifies whether the user_IO_structure contains addresses of
real pages. This flag must be OFF (0), or the osi_uiomove service
fails the request.
- UIO.u_key
- Specifies the storage key of the caller's buffer.
- UIO.u_iovresidualcnt
- Specifies the number of bytes remaining in the buffer or iov structure
that is pointed to by the user_IO_structure.
- u_totalbytesrw
- Specifies the total number of bytes that are to be moved.
Characteristics and restrictions- This routine must be used only on the dispatchable unit (task
or SRB) that made the vnode or VFS call because the service requires
the use of the cross-memory environment of the calling dispatchable
unit.
- The osi_uiomove service does not support DATOFF moves; that is,
it fails requests if the UIO.u_realpage flag is ON.
|